Checkpoint: Caching
One Chapter, One Reflex
Nine lessons ago, a cache was 'remember the answer.' Since then you've walked the whole stack: why hit rate is the entire game, who fills the cache and who owns the truth, what to evict, how copies lie and how to catch them, how one expiry becomes a stampede, how a fleet shares a keyspace, and how the same ideas run a planet-sized edge — plus a terminal session where every one of those numbers showed up for real.
Time to compress it into what it actually becomes on the job: a reflex. Not definitions — decisions. Below are ten situations pulled straight from production life. Each has one move that this chapter argues for and three that sound right (they're the exact traps the lessons warned about). The cheat-sheet is your map of the terrain; the checkpoint is the test drive.

Make the Call: Ten Caches, Ten Decisions
No trick questions and nothing you haven't seen — every scenario is one of this chapter's core decisions wearing work clothes. Read each situation, commit to a move, and check the reasoning. Seven or more and the chapter is locked in; anything you miss points at the exact lesson to skim again.

What You Can Now Do
Walking out of this chapter, three questions should fire automatically whenever data crosses a slow boundary:
- Is it hot? Caching only wins where reads repeat — a few hot keys, reads over writes. No locality, no cache (and no amount of memory changes that).
- How stale may it be? That number is your design: it picks the TTL, decides delete-on-write versus CDC, sets
max-agefor the browsers you can never purge, and tells you whether write-behind's loss window is acceptable. - Who un-lies it? Every copy needs a named owner of its freshness — a TTL, a write path that deletes, an event stream, or a versioned URL that makes the old copy unreachable. 'Nobody' is how caches end up serving 149 product.
And underneath all ten decisions, the chapter's five moves kept repeating: bound the lie (TTL as the floor), collapse the herd (single-flight, shields), version instead of fixing (keys, epochs, URLs), keep the cache losable (cache-aside + a time budget), and measure hit rate above everything — it's the one number that predicts the rest.
Wrapping Up §8
That's caching, end to end: from one RAM lookup to four hundred cities, with the same handful of ideas scaling all the way up. It's also the chapter you'll reuse most — nearly every system you design from here on will have at least one cache in it, and now you know exactly where its bodies get buried.
Next section — Estimation & Numbers: the back-of-the-envelope skill that turns 'should we cache this?' from a vibe into arithmetic. How many requests is that really? How much RAM does the hot set need? Does it fit on one box? The numbers you've been absorbing all course — latencies, throughputs, capacities — become the tools you reason with, fast, in interviews and design reviews alike.