Performance / Quiz
Caching Strategies
Cache-Control, ETags, CDN layers, and the two hardest problems in computer science, one of which is invalidation.
- Difficulty
- Medium
- Format
- Quiz
- Points
- 150
- Estimate
- 8 min
// MISSION BRIEF
Your Mission
Caching is the cheapest performance win and the richest source of "works on my machine" bugs. This quiz covers HTTP caching headers, CDN behavior, and the invalidation traps that serve users stale (or private) data.
// FIRST CONTACT
Battle teaser
A response sets `Cache-Control: max-age=3600`. A user edits the resource; others see the old version for up to an hour. The fix that keeps caching AND freshness:
- ASet max-age=0 everywhere and stop caching
- BAppend a random query string on every request
- CIncrease max-age so it updates less often
- DUse a validator (ETag / Last-Modified) with `no-cache` (or short max-age + revalidation) so caches re-check before serving
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
performancecachingcdnhttp