← 🗂️ Algorithms

🗂️ LRU Cache: Evicting the Least Recently Used Item

Hits: 0
Evictions: 0
Drag — rotate · Scroll — zoom

🗂️ LRU Cache: Evicting the Least Recently Used Item

This simulator demonstrates how a fixed-capacity LRU cache processes a sequence of accesses, showing hits, misses, and which item gets evicted each time the cache is full.

🔬 What It Demonstrates

This simulator demonstrates how a fixed-capacity LRU cache processes a sequence of accesses, showing hits, misses, and which item gets evicted each time the cache is full.

🎮 How to Use

Set the cache capacity, then feed in a sequence of keys one at a time to watch the recency order update and see evictions happen live.

💡 Did You Know?

Real CPU caches rarely implement exact LRU because tracking true recency for many cache lines is expensive in hardware, so they use cheaper approximations that behave similarly.