Open benbierens opened 1 year ago
Memory cache should use a least-recently-used approach.
This should already be the case, no?
type
CacheStore* = ref object of BlockStore
currentSize*: Natural # in bytes
size*: Positive # in bytes
cache: LruCache[Cid, Block]
An in-memory cache implementing either 'datastore' or 'blockstore' abstraction can help improve performance for slow storage devices. Memory cache should use a least-recently-used approach. Memory cache size should be adjustable from config. Memory cache feature should be able to be disabled from config.
Consider adjusting current 'CacheStore'.