Caching
Cache patterns, eviction, distributed caches, CDN, hot keys, and stampede prevention.
Figure: Multi-tier cache-aside read path.
What You'll Learn
Caching is the highest-ROI performance lever — and the fastest way to serve stale data. This domain covers cache-aside, read-through, write-through, invalidation strategies, distributed caches (Redis), and preventing cache stampedes.
Chapters
| Chapter | Focus |
|---|---|
| Caching Fundamentals | Cache-aside, TTL, eviction policies |
| Cache Invalidation | TTL, event-driven purge, cache stampede |
| Distributed Caching | Redis cluster, consistent hashing, hot keys |
Learning Path
- Caching Fundamentals — patterns and when each applies.
- Cache Invalidation — "the two hard problems" in practice.
- Distributed Caching — Redis, Memcached, CDN edge caching.
Interview Prep
| Resource | Topic |
|---|---|
| Meta News Feed | Fan-out, feed caching |
| Airbnb Rate Limiting | Redis-backed quotas |
| Distributed Cache Design | System design exercise |
| Lab 001 consistent hashing | Hash ring on :8096 |
Prerequisites
Next Domain
Continue to Microservices and System Design.
Production readiness + Game Day
Every substantive chapter in this domain targets the Production LLD and Game Day Standard: whiteboard Production LLD (cache tiers, invalidation, stampede controls) and run Game Day drills (inject → detect → mitigate → verify → learn).
| Start here | What you practice |
|---|---|
| Chapter §22A / §22B | Ship-ready LLD + drill catalog |
| Chapter §23 PRACTICE | Full interview script |
| Cache Invalidation §22A | Invalidation + thundering herd / singleflight |
| Distributed Caching §22A | Consistent hash, hot keys, L1 near-cache |
| Curriculum Overview — Phase 7 | Rollout status |
Return to the Curriculum Overview for the full learning path.