We use analytics cookies.We use cookies to analyze site traffic and improve your experience.
Loading...
System Design Masterclass · Caching Strategies
Free preview: the first 2 parts of this 9-part lesson.
Already bought the course? Sign in to read the whole lesson.
this lesson is part of
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design courseread the rest of this lesson in
System Design Masterclass
Unlock this lesson and the 751 other paid lessons
$25 once, by PayPal
See the System Design coursein Caching Strategies
This lesson is part of the full System Design Masterclass. Unlock it along with 769 other lessons for a one-time payment.
One-time payment by card or PayPal
Get Lifetime AccessOne-time payment: UPI, card or netbanking
Get Lifetime Access18 Foundation lessons are free, no payment needed. Try them now
It is easy and good
“It is really nice and good Please join the course”
The eviction lesson compared ways of choosing a victim when the cache is full. Caffeine's design is about the question before that one: when a new key arrives and the cache is full, should it be let in at all.
That sounds like a distinction without a difference until a batch job runs.

An LRU has no way to refuse: the newest key is by definition the most recent. So a scan of a million keys evicts a million entries, one at a time.
Read admission and eviction as two separate decisions with two separate policies. Almost every cache has the second and almost none have the first, which is why a nightly export can quietly halve a hit rate.

Every policy saw the identical request stream, and the hit rates are exact counts.

Nothing in this chart would make anybody change anything. That is the point of running it.
Run the uninteresting case before the interesting one. A comparison that only ever measured the hard workload cannot tell you whether the winner won because of the thing you are about to claim, or because it was better all along.