awesome-everything RU
↑ Back to the climb

Caching

Caching capstone: multiple-choice review

Crux Multiple-choice synthesis across the caching track — layer ownership, TTL cascade, stampede vs dogpile protection, validators, SWR, and invalidation propagation as one composed strategy.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at senior altitude — in orbit
◷ 14 min

Six questions that cut across the whole track. None tests a single directive in isolation — each asks you to reason about how two or more layers compose, which is where real caching bugs live.

Goal

Confirm you can wire layer ownership, TTL cascade, stampede protection, validators, and stale-while-revalidate into one coherent strategy — the synthesis the individual units built toward.

Quiz

A request passes through CDN, reverse proxy, Redis, and the DB. An editor changes a product, the write path updates the DB and deletes the Redis key, but users still see the old price for an hour. Where is the bug?

Quiz

You set the CDN to s-maxage=3600 but the app revalidates its Redis fragment every 60s. Why is this a composition bug regardless of which numbers are correct individually?

Quiz

A hot key with thousands of concurrent readers expires. You can add (a) a per-key mutex so one request recomputes while the rest wait, or (b) stale-while-revalidate. A senior usually reaches for SWR first. Why?

Quiz

A public API read costs 40ms to compute and changes rarely. You want low latency, low origin load, and bandwidth savings on the wire. Which combination composes these correctly?

Quiz

A logged-in dashboard renders per-user billing data and sits behind a shared CDN. The handler returns 200 with no Cache-Control. What is the actual risk, and the correct fix?

Quiz

Across the stack, which statement about failing open during an origin outage is correct?

Recap

The track’s through-line is one composed strategy: assign each layer the data it owns, shrink freshness windows outward (or purge the outer layer on every inner change), protect the origin on a hot-key expiry with single-flight or SWR, save bandwidth with ETag-driven 304s, scope per-user responses with private/no-store, wire invalidation into the write path so it propagates Redis → proxy → CDN in order, and fail open with stale-if-error tuned per resource. No single directive is the answer; the answer is how the layers compose.

Continue the climb ↑Caching capstone: free-recall review
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.