caching/mru_cache library

MRU (most-recently-used) cache with access-frequency tracking — roadmap #509.

An MRU cache evicts the most recently used entry when full — the opposite of LRU. This is the right policy for cyclic or single-pass scans (looping over a dataset larger than the cache): the item just touched is the one least likely to be needed again soon, while older entries near the start of the cycle will be revisited first. Under such access patterns MRU beats LRU, which would otherwise evict exactly the entries about to be reused.

Alongside eviction it tracks a per-key access count (frequencyOf), useful for hotspot detection and cache-tuning telemetry. Frequencies persist for as long as the key stays resident and reset when it is evicted or removed.

Classes

MruCache<K, V>
A fixed-capacity cache using most-recently-used eviction.