Caching Strategies
Production caching for technical interviews: placement, read/write patterns, freshness, stampedes, HTTP caching, observability, failure recovery, and decision tradeoffs.
- Minutes to read
- 3
- Practice MCQs
- 25
- Interview Q&A
- 25
- Edition
- v5
- Editorial status
- Reviewed
- Relevant for
- Agentic AI EngineerBackend EngineerBackend Software EngineerBlockchain DeveloperCloud ArchitectCloud EngineerData EngineerDevOps EngineerFrontend EngineerFull-Stack DeveloperIdentity and Access Management (IAM) EngineerPlatform EngineerProduct EngineerSecurity ArchitectSite Reliability EngineerSoftware Development Engineer (SDE)Software EngineerSolutions ArchitectTechnical Product Manager
Scope: HTTP caching per RFC 9111 and RFC 5861; Redis behavior referenced from current official documentation accessed 2026-08-30..
Curated: · Written: · Reviewed:
MCQ-20Hit latency is 2 ms, miss latency is 50 ms, and hit rate is 90%. What is the approximate expected lookup latency before unrelated application work?
Answer to see the discussion.
MCQ-1A service proposes caching results whose keys are rarely requested twice and whose values must reflect the latest committed write. What is the best initial decision?
Answer to see the discussion.
MCQ-6Product requires catalog data to be no more than 60 seconds stale, while updates should usually appear within 5 seconds. Which policy best expresses that contract?
Answer to see the discussion.
MCQ-4A team says write-through means its cache can never be stale. Which review response is most accurate?
Answer to see the discussion.
MCQ-25A browser has an expired response with ETag "v42". The representation is unchanged. What is the efficient standards-based exchange?
Answer to see the discussion.
MCQ-23An API response may stay in browsers for 60 seconds but in a shared CDN for 10 minutes. Which directive expresses that distinction?
Answer to see the discussion.
MCQ-13When is LFU more likely than LRU to retain the better working set?
Answer to see the discussion.
MCQ-12A workload has a stable set of popular keys plus occasional one-time scans over millions of unique keys. Which policy concern is most important?
Answer to see the discussion.
MCQ-10A million keys receive the same 30-minute TTL during a bulk load. What change best reduces the synchronized expiry wave without materially changing freshness?
Answer to see the discussion.
MCQ-8Ten thousand requests arrive just after one popular key expires. Which control most directly prevents ten thousand source reads for that key?
Answer to see the discussion.
MCQ-11Clients repeatedly request an ID that does not exist, creating expensive database misses. What is the safest useful negative-caching policy?
Answer to see the discussion.
MCQ-17A cached response varies by tenant, locale, currency, API version, and experiment assignment. Which key design is safest?
Answer to see the discussion.
MCQ-18A public search endpoint places the raw query string directly in cache keys with no length or normalization limits. What risk is most direct?
Answer to see the discussion.
MCQ-19A cache reports 95% request hit rate, yet backend cost remains high. Which additional measurement is most diagnostic?
Answer to see the discussion.
MCQ-14A fleet uses only per-process caches for shared configuration. What operational behavior should the design expect?
Answer to see the discussion.
MCQ-5A write-behind cache acknowledges an order update before flushing it to the database. Which requirement is most important if losing an acknowledged update is unacceptable?
Answer to see the discussion.
MCQ-3A database update succeeds but the subsequent cache deletion times out. Which design most directly closes this invalidation gap without claiming atomic dual writes?
Answer to see the discussion.
MCQ-2In cache-aside, a reader loads version 7 after a miss; meanwhile a writer commits version 8 and invalidates the key. The reader then stores version 7. What is the failure and strongest mitigation?
Answer to see the discussion.
MCQ-15An application has a 30-second local L1 and a shared L2. A writer deletes only the L2 key. What must the freshness design account for?
Answer to see the discussion.
MCQ-7A dependency is temporarily failing. The product permits data up to ten minutes old but never older. Which cache design best preserves availability within that rule?
Answer to see the discussion.
MCQ-9A distributed refresh lock has a 5-second lease, but computation sometimes takes 12 seconds. What additional mechanism best prevents an expired old holder from overwriting a newer refresh?
Answer to see the discussion.
MCQ-22A deployment replaces every instance and each new process has an empty local cache. Which rollout plan best protects the database?
Answer to see the discussion.
MCQ-16One product key saturates a single cache shard while cluster-wide CPU and memory look moderate. What is the most useful next action?
Answer to see the discussion.
MCQ-21During a full distributed-cache outage, all application instances fall back to the database without limits. What is the primary resilience defect?
Answer to see the discussion.