Open kdeme opened 1 month ago
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.
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.