InterviewStack.io LogoInterviewStack.io

Caching Strategies and In Memory Storage Questions

Understanding caching mechanisms (HTTP caching, application-level caching with Redis/Memcached). Cache invalidation strategies, TTL, and when to cache. Performance implications.

MediumTechnical
57 practiced
Describe an adaptive caching strategy for a mobile app that adjusts TTLs, cache sizes, and prefetch aggressiveness in response to network conditions (Wi-Fi/4G/3G/offline), battery state, and user settings. Include how the app can detect these conditions and a simple decision algorithm.
HardTechnical
44 practiced
Design and provide pseudocode for a hybrid cache architecture where the mobile client uses a write-through strategy for critical updates but buffers non-critical writes offline (write-behind). Include how to queue writes, ensure idempotency, handle conflicts when syncing, and how the client UI should present pending/unconfirmed changes to the user.
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.
MediumSystem Design
56 practiced
You are building an offline-capable Flutter app that must work with user data and messages. Design the client-side cache schema and synchronization approach: local data model, metadata to support sync (timestamps/version vectors), conflict resolution policy, delta sync vs full sync, and background sync triggers. Describe pros/cons of different conflict resolution strategies.
MediumTechnical
84 practiced
Describe how to securely cache sensitive tokens and credentials on iOS and Android. Include platform APIs (Keychain, Android Keystore), when to use encrypted shared preferences or file encryption, how to protect against backups/extraction, and how to handle token expiration and refresh securely without exposing secrets.

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.