Skip to content
Tech Interview Prep
Technical interview guide

Caching Strategies

Production caching for technical interviews: placement, read/write patterns, freshness, stampedes, HTTP caching, observability, failure recovery, and decision tradeoffs.

Read
24 min
Practice MCQs
25
Interview Q&A
25
Edition
v4
Editorial status
Reviewed

Scope: HTTP caching per RFC 9111 and RFC 5861; Redis behavior referenced from current official documentation accessed 2026-08-30..

Curated: · Written: · Reviewed:

25 questions

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?
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?
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?
MCQ-4A team says write-through means its cache can never be stale. Which review response is most accurate?
MCQ-25A browser has an expired response with ETag "v42". The representation is unchanged. What is the efficient standards-based exchange?
MCQ-23An API response may stay in browsers for 60 seconds but in a shared CDN for 10 minutes. Which directive expresses that distinction?
MCQ-13When is LFU more likely than LRU to retain the better working set?
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?
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?
MCQ-8Ten thousand requests arrive just after one popular key expires. Which control most directly prevents ten thousand source reads for that key?
MCQ-11Clients repeatedly request an ID that does not exist, creating expensive database misses. What is the safest useful negative-caching policy?
MCQ-17A cached response varies by tenant, locale, currency, API version, and experiment assignment. Which key design is safest?
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?
MCQ-19A cache reports 95% request hit rate, yet backend cost remains high. Which additional measurement is most diagnostic?
MCQ-14A fleet uses only per-process caches for shared configuration. What operational behavior should the design expect?
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?
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?
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?
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?
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?
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?
MCQ-22A deployment replaces every instance and each new process has an empty local cache. Which rollout plan best protects the database?
MCQ-16One product key saturates a single cache shard while cluster-wide CPU and memory look moderate. What is the most useful next action?
MCQ-21During a full distributed-cache outage, all application instances fall back to the database without limits. What is the primary resilience defect?
MCQ-24A CDN caches /dashboard, whose body varies by Authorization and Accept-Language. What is the safest default response policy?