awesome-everything RU
↑ Back to the climb

Caching

Cache layers: free-recall review

Crux Free-recall prompts across the cache-layers unit. Answer each in your own words first, then reveal the model answer and compare.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 14 min

Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of recall is what makes the latency ladder and the failure modes stick.

Goal

Reconstruct the unit’s spine — the latency ladder, hit-ratio break-even, the OS page cache, where to cache, and the wrong-layer and double-caching failures — without looking back at the lesson.

Recall before you leave
  1. 01
    Walk the caching latency ladder from fastest to slowest with rough numbers, and explain why the orders of magnitude matter more than the exact figures.
  2. 02
    Why can adding a cache make latency worse, and what is the average-latency formula that proves it?
  3. 03
    What is the OS page cache, and why does it change the 'should I add Redis?' decision?
  4. 04
    Given a candidate read path, how do you decide whether to cache and at which layer?
  5. 05
    What is double-caching, why does it produce stale-on-stale bugs, and what makes them hard to debug?
  6. 06
    What does a low hit ratio actually tell you, and why is 'increase the hit ratio' not always the goal?
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: caching is a latency ladder where orders of magnitude decide whether a cache helps; a miss pays cache+origin so a low hit ratio or a fast origin makes the cache worse than none; the OS page cache and buffer pool often make the origin already RAM-fast; you cache only when the origin is slow, the hit ratio is high, and staleness is tolerable, at the layer the data’s volatility allows; and the recurring senior failures are wrong-layer caching and double-caching one fact at two layers — fixed by one owner and one invalidation path per cached fact.

Continue the climb ↑Cache layers: header and trace reading
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.