awesome-everything RU
↑ Back to the climb

Caching

Caching capstone: free-recall review

Crux Free-recall prompts spanning the whole caching track. 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 across the whole track is what fuses the separate units into one design instinct.

Goal

Reconstruct the track’s spine — layer ownership, the TTL-cascade rule, stampede vs dogpile defences, validators vs freshness, SWR vs stale-if-error, and write-path invalidation — without looking back at the lessons.

Recall before you leave
  1. 01
    Name the four caching layers a byte may pass through and the data each one should own.
  2. 02
    State the TTL-cascade rule and explain the bug it prevents.
  3. 03
    Distinguish a stampede from a dogpile, and give the defence for each.
  4. 04
    When do you reach for a validator (ETag/Last-Modified) versus a freshness directive (max-age/s-maxage)?
  5. 05
    Contrast stale-while-revalidate with stale-if-error and explain why a robust stack uses both.
  6. 06
    Why does invalidation belong on the write path, and what is the correct propagation order?
Recap

If you reconstructed each answer from memory, you hold the track’s spine as one design: assign each layer its owned data, shrink freshness outward (or purge the outer layer on every inner change), defend a hot-key expiry with single-flight plus SWR, use freshness directives to skip the request and validators to make the unavoidable revalidation a cheap 304, layer stale-while-revalidate for the happy path with stale-if-error for outages, and wire invalidation into the write path so it propagates Redis → proxy → CDN in order. The capstone skill is composing these into a strategy that holds under real traffic — not memorising any one directive.

Continue the climb ↑Caching capstone: code and header 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.