Try
↑ ↓ move↵ openesc close
In this lesson · topic 7 of 7
  1. 1. Why a small cache works at all
  2. 2. FIFO, LRU, LFU, and TinyLFU
  3. 3. Move the hot keys under four policies
  4. 4. Why plain LFU stays stuck after a shift
  5. 5. How big a cache do you need
  6. 6. When a hot key expires
  7. 7. Check the eviction rules

Topic 7

Check the eviction rules

3 min read

Predict first

A cache keeps a hot item out of a full cache by evicting whichever key was inserted first, even if that key was just read. Which policy is this?

Predict first

A product launch makes a completely new set of items popular overnight. Which cache degrades most and stays degraded?

Predict first

What does TinyLFU's admission rule do when a missed key arrives at a full cache?

Take away

  • A cache pays off because popularity is skewed. More skew means a bigger payoff for the same size.
  • Recency adapts fast and frequency identifies stable favourites. Admission with aging gets most of both.
  • Test policies on workloads that change, not only on steady ones.

Sources

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms