Caching Strategies and In Memory Storage Questions
Caching strategies for improving performance and reducing latency: HTTP caching semantics (Cache-Control, ETag, conditional requests, Vary), application-level caching with Redis and Memcached, in-memory data structures for caching, cache eviction policies (LRU, LFU, FIFO), cache invalidation strategies, TTL selection and trade-offs, and the consistency and performance implications of deciding what and when to cache.
MediumSystem Design
50 practiced
Design a caching layer for product detail pages in an e-commerce application serving 10,000 requests per second. Describe cache placement across CDN, edge, application cache, and DB; cache key design including variants (currency, locale, logged-in state); invalidation strategy when product details or inventory change; choosing TTLs; and fallback behavior for cache misses.
EasyTechnical
46 practiced
What is cache warming (preloading) and why would a backend service use it? Describe practical strategies to warm caches during deployment or scale-up events: background prefetch workers, replaying recent traffic, precomputing popular keys, and selectively priming edges. Discuss trade-offs including additional load and potential stale priming.
HardTechnical
44 practiced
Your Redis nodes are showing high memory fragmentation and periodic latency spikes under heavy write load. Outline a detailed diagnostic and remediation plan: which Redis INFO and system metrics to check, how allocator settings like jemalloc affect fragmentation, strategies such as reworking key/value sizes, enabling lazyfree or defrag, tuning AOF/RDB settings, and application-level batching to reduce churn.
EasyTechnical
60 practiced
Explain cache-aside (lazy loading), write-through, and write-back caching patterns. For each pattern describe read and write flows, consistency guarantees, failure scenarios (power loss, crashes), and typical backend use-cases such as user profile reads or inventory updates. Which pattern would you choose for high write intensity and why?
EasyTechnical
50 practiced
List and compare common cache eviction policies such as LRU, LFU, FIFO, random, and TTL-based eviction. Explain which policy is preferable under different workload patterns (temporal locality, skewed popularity, uniform access) and give examples of how hybrid policies like Redis's volatile-lru help in practice.
Unlock Full Question Bank
Get access to hundreds of Caching Strategies and In Memory Storage interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.