Skip to content
← Notes

Caching

Cache strategies, Redis, CDN

  1. 00 Caching — Roadmap In-process LRU first. Self-host Redis. Eviction policies, invalidation, stampedes.
  2. 01 Why Caching Exists The latency gap between memory, disk, and network — and why every fast system exploits it.
  3. 02 Cache Strategies Cache-aside, read-through, write-through, write-behind — when to use each and what breaks when you don't.
  4. 03 Eviction Policies LRU, LFU, TTL, and friends — how caches decide what to throw away when memory fills up.
  5. 04 Redis Fundamentals Data structures, core commands, persistence modes — everything you need to run Redis confidently in production.
  6. 05 Cache Invalidation The hardest problem in computer science — TTL, event-driven purging, versioned keys, and when to accept staleness.
  7. 06 Cache Stampede & Thundering Herd What happens when a popular cache entry expires and a thousand requests hit the database simultaneously — and how to stop it.
  8. 07 Distributed Caching Sharing cache state across multiple servers — consistent hashing, Redis Cluster, and the failure modes that will surprise you.
  9. 08 HTTP Caching & CDN Cache-Control, ETags, and CDN edge caching — the layer that can eliminate your server entirely for static content.
  10. 09 Application Caching Patterns Fragment caching, query result caching, session stores, computed value memoization — practical patterns for real applications.
  11. 10 Production Caching Monitoring hit ratios, detecting hot keys, handling Redis failures gracefully, and knowing when to flush everything.