ColdStorage icon indicating copy to clipboard operation
ColdStorage copied to clipboard

Implement a counter to keep track of frequency of cache hits for an item in the cache,

Open crypticminds opened this issue 6 years ago • 0 comments

Is your feature request related to a problem? Please describe.

A cache should be able to prioritize which data must be evicted from the app memory to make room for new ones and one of the methods is to keep frequently used data in the app memory.

Describe the solution you'd like A counter needs to be implemented that will keep track of how many times a key is requested from the cache.

Additional context Every item that is stored in the cache has certain metadata attached to it like timeToLive, timestamp etc. An additional parameter needs to be added to this metadata which should be incremented every time the cache is requested for a particular key.

crypticminds avatar Feb 15 '20 11:02 crypticminds