hits 0 misses 0 evictions 0 hit ratio
// click a key to call cache.get(key)
HashMapkey → node
no order at all.
that is what the list is for.
Doubly-linked list · by recencyLRU
▲ MRU end — just usedLRU end — evict here ▼
A capacity-3 cache, drawn as real pointers
Click a key below to call cache.get(key). A hit slides the node to the MRU end; a miss loads it and, if the cache is full, the tail dies.
Replay under 🔁 LRU, reset, then replay under 📊 LFU — a different key dies.