pub struct Cache { /* private fields */ }Expand description
A learning cache tracker.
This keeps track of cache blocks.
A cache block represents some data, which is not managed by the cache tracker. The cache block is said to be touched when this data is used in some way.
The ideal replacement is the block which is used in the most distant future. As this is not possible to know in advance, we make a prediction or a approximate ideal replacement, which is based around various data points of the block such as the time of the last uses, or the number of touches.
The aim of the cache tracker is to provided approximate ideal replacements. Numerous algorithms for making these predictions exists (examples are LRU, PLRU, LFU, MFU, MRU, ARC, etc.), but MLCR uses an approach which is radically different: It feeds the data points into a neural network and lets this estimate the tick of the next touch.