← Back to Index

🧠 LRU Cache

Doubly Linked List + Hash Map Β· Get / Put / Evict
0/4
Size
Most Recent
Least Recent
0
Cache Hits
Ready
Status

Operation Log

Touched / moved to MRU
Cache hit
Evicted (LRU tail)
Hash map lookup
New insertion

How It Works

An LRU (Least Recently Used) cache evicts the least-recently-used entry when full. It achieves O(1) get and put using two structures: