System InternalsLearn ↗LRU / LFU CacheGETPUT

LRU / LFU Cache — pick a scenario

0/3 done

Pick one and press Start, then click Next › to step through it.

Watch for

Which key gets evicted — the one whose last access is oldest, not the one that was added first.

More about this scenario
You'll learn

What 'least recently used' actually means, and why recency is a decent guess at what you'll need next.

How it runs

PUTs and GETs fill the cache and reorder it by how recently each key was touched; when a new key arrives at capacity, the entry untouched the longest is evicted.