Caching
Answer the repeat questions from memory, and most of your traffic never touches the database.
5 lessons · ~51 min · free
By the end you can
- Explain why a small cache absorbs most reads (skewed access patterns)
- Choose between cache-aside, read-through, write-through, and write-behind
- Reason about TTLs, invalidation, and stale reads without hand-waving
- Defend an eviction policy with hit-rate numbers, not vibes
- Place caches at the right layers of a design and say the trade-offs out loud
Lessons
Start the course- The requests you keep re-answering9 minThe latency ladder, skewed access patterns, and what one small cache does to database load.
- Cache-aside and its siblings11 minWho fills the cache and when: cache-aside, read-through, write-through, write-behind.
- Staleness, TTLs, and invalidation12 minThe two ways cached data goes wrong, expiry vs explicit invalidation, and the thundering herd.
- When the cache is full10 minLRU, LFU, and FIFO racing on the same trace, and what production caches actually run.
- Caching in a real design9 minBrowser to CDN to app to database: the layers, what to cache where, and the interview traps.
The account is free and so is every lesson. It unlocks the courses and saves your progress.
Design with it after
The design library has full system design prompts on a whiteboard canvas with AI feedback. Every one of them gives you a place to apply this.
Open the design library