The library

The systems around the model

Be able to explain why caching works at all, what a hit is worth, how to decide what to throw away, how to keep a cache honest, where to put one, how a cache makes things worse, and how to tell whether yours is earning its place

Keeping the Answer Nearby

A cache is a bet that you will be asked the same thing again. The bet usually pays, and the interesting part is everything that happens when it does not.

8 lessons, written and corrected before you arrived. Reading them here needs no account. The first reads the whole way through; the others open and then stop, because a page nobody owns cannot tell who is reading it. Starting the course gives you your own copy, where every idea has problems standing under it and you can ask about any sentence.

Start reading

  1. 01The Same Thing, Asked AgainCaching works because real traffic is wildly lopsided. A handful of items absorb most of the requests, so a cache far too small to hold everything can still answer nearly everything.
  2. 02What You Actually Buy With a Hitopening onlyA hit rate is not a score. It converts into two very different things, a faster average and a much lighter load on whatever sits behind the cache, and the second usually matters more.
  3. 03Choosing What to Forgetopening onlyA full cache cannot accept anything without discarding something. Every eviction rule is a guess about the future built from the only evidence available, which is the past.
  4. 04When the Copy Stops Being Trueopening onlyA cached answer is true until the real thing changes, and nothing tells the cache that it has. There are only two remedies, a clock and a message, and both of them leak.
  5. 05Choosing How Far Away to Keep Itopening onlyThere is a ladder of places a copy can live, from the reader's own device to a shared tier beside the store, and each rung trades speed against how many people the copy serves.
  6. 06The Ways a Cache Turns On Youopening onlyAdding a cache adds a component that can fail, a dependence on it succeeding, and a crowd that arrives all at once the moment a popular answer expires.
  7. 07Many Boxes Pretending to Be Oneopening onlyOne machine is never enough, so the keys get spread across many. Then the interesting questions are which box holds what, what happens when a box leaves, and what to do about one key everybody wants.
  8. 08Telling Whether It Earns Its Placeopening onlyThe hit rate is the number everybody watches and the one that answers the fewest questions. What you want to know is what the cache saved, what it still fails to save, and what more of it would buy.