InterviewStack.io LogoInterviewStack.io

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.

EasyTechnical
51 practiced
Describe how common HTTP caching headers (Cache-Control, ETag, Last-Modified, Expires) affect caching behavior in a mobile app. Provide example header values and explain how a mobile client should handle conditional GETs (If-None-Match, If-Modified-Since) and 304 Not Modified responses to minimize data transfer.
HardTechnical
54 practiced
You observe a production regression: client cache hit rate dropped 40% after a recent release and battery usage on the app increased significantly. Outline a step-by-step debugging plan: data and instrumentation to collect, hypotheses to test (e.g., cache misconfiguration, increased cache churn, background jobs), code and backend checks, and a remediation strategy that minimizes user impact.
HardSystem Design
56 practiced
Design a scalable push-based cache invalidation mechanism using FCM/APNs to notify mobile clients to refresh or remove specific cached content. The system must support 10M users, rate limits, and privacy constraints. Describe message format, topic vs per-device strategies, batching, security (auth), and how clients should safely process invalidations when offline or with delayed delivery.
HardTechnical
56 practiced
Design an encrypted on-device cache for mobile that supports secure key rotation. The solution must allow offline access, use platform keystores, enable rotating encryption keys without losing access to cached data, and prevent attackers from extracting cached secrets. Describe key-wrapping/envelope-encryption and a migration plan for rotation.
EasyTechnical
45 practiced
Explain the "stale-while-revalidate" pattern and describe how you would implement it in a mobile app's networking layer. Describe the UI behavior you would adopt so users see fast content but also eventually get fresh updates without jarring UI refreshes.

Unlock Full Question Bank

Get access to hundreds of Caching Strategies and In Memory Storage interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.