- Caching Deep-Dive · System Design
LLearnViaNotes @learnvianotes· 2 min read Comprehensive master guide to caching strategies, Redis eviction policies, consistent hashing, cache stampede mitigations, and distributed Redis cluster topology.
Cache Strategies & Design Patterns
Redis maxmemory-policy Settings
| Policy | Scope | Behavior |
|---|
noeviction | All Keys | Returns error on writes when memory limit reached. Best for critical caches. |
allkeys-lru | All Keys | Evicts Least Recently Used keys across entire dataset. (Most popular choice). |
volatile-lru | Keys with TTL | Evicts Least Recently Used keys among keys configured with expiration TTL. |
allkeys-lfu | All Keys | Evicts Least Frequently Used keys using logarithmic access counters. |
volatile-ttl | Keys with TTL | Evicts keys with the shortest remaining Time-To-Live. |
Cache Stampede & Hot Key Mitigation
Redis Cluster vs Redis Sentinel
Free for students and teachers
Write notes like this one
Cards for every idea, quizzes and flashcards, read aloud — on the web and your phone.
Something wrong with this note? Open it to report