Skip to content
  • Caching Deep-Dive · System Design

Caching Deep-Dive

LearnViaNotes @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 Eviction Policies

Redis maxmemory-policy Settings

PolicyScopeBehavior
noevictionAll KeysReturns error on writes when memory limit reached. Best for critical caches.
allkeys-lruAll KeysEvicts Least Recently Used keys across entire dataset. (Most popular choice).
volatile-lruKeys with TTLEvicts Least Recently Used keys among keys configured with expiration TTL.
allkeys-lfuAll KeysEvicts Least Frequently Used keys using logarithmic access counters.
volatile-ttlKeys with TTLEvicts 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