ContentsThe library

Keeping the Answer Nearby

Telling Whether It Earns Its Place

Last timeWhen There Is More Than One

The 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.

Every cache reports a hit rate, and it is the first number anybody looks at. It

is also the number least able to answer the question people are asking, which is

whether the cache is worth what it costs and what to do next.

What the hit rate leaves out

A hit rate counts events and weights them all the same. One hit on an answer that

would have taken two seconds counts exactly as much as one hit on an answer that

would have taken a tenth of a millisecond.

FIG 1What the cache actually saved
the work avoided per second, in whatever unit the work is measured
the read rate
the hit rate
the cost of producing one answer when it is not held
the hits per second, which is what a hit rate alone gives you, missing the third factor entirely
Two caches with hit rates of forty and ninety percent can be ranked either way by this expression, because the third factor varies by orders of magnitude between kinds of answer while the first two rarely vary by more than one.

So the measurement worth keeping is not the hit rate but the product. In

practice that means recording, per kind of answer, how many hits it took and what

a miss on it costs, and reporting the saving. A cache whose hits are all on

expensive answers can be enormously valuable at a hit rate people would describe

as broken.

The lesson stops here

4 more paragraphs to go

You have read the opening. The rest of the argument, the problems that check whether it landed, and the lines worth keeping at the end all come with a plan.

The first lesson of every course in the library reads the whole way through, free, so you can see exactly what the rest of them are.

See the planThe contents

This is the reading half

Starting the course gives you your own copy of it. Every idea on every page has problems standing under it, marked with a reason rather than a tick, and any sentence you do not believe can be opened and argued with. None of that can happen on a page nobody owns.

The contents

The rest of this course

  1. 01The Same Thing, Asked Again
  2. 02What You Actually Buy With a Hitopening only
  3. 03Choosing What to Forgetopening only
  4. 04When the Copy Stops Being Trueopening only
  5. 05Choosing How Far Away to Keep Itopening only
  6. 06The Ways a Cache Turns On Youopening only
  7. 07Many Boxes Pretending to Be Oneopening only
  8. 08Telling Whether It Earns Its Placeyou are here

Read alongside