LFU (Least Frequently Used) evicts items with the lowest access count. It keeps popular items in cache longer than LRU.
How it works:
Each cache entry tracks access count. When cache is full, remove the entry with lowest count.
Best for:
- Stable popularity patterns (trending videos, popular products)
- When hot data remains hot over time
Weakness: Slow to adapt when popularity shifts. New items start with low counts and may be evicted before becoming popular.