Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ContentCache for each portal subprotocol (Portal wire protocol) #2186

Open
kdeme opened this issue May 14, 2024 · 1 comment
Open

Add ContentCache for each portal subprotocol (Portal wire protocol) #2186

kdeme opened this issue May 14, 2024 · 1 comment

Comments

@kdeme
Copy link
Contributor

kdeme commented May 14, 2024

Probably each subnetwork would benefit from having a content cache. This means caching the most recently requested content items, even when they are not supposed to be stored by that node.

The first network to apply it on would be history network. There should be a flag to be able to disable/enable it.

Perhaps LRU (https://github.com/status-im/nim-eth/blob/master/eth/p2p/discoveryv5/lru.nim) can be used for it as cache.

@web3-developer
Copy link
Contributor

web3-developer commented Jun 21, 2024

I see this task as relatively low priority because the database already stores a copy of the content as long as it is within the data radius.

The benefits of this in memory cache are that we can cache recent requests even if the content is outside our data radius and being in memory performance would be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants