InterviewStack.io LogoInterviewStack.io

Client Caching and Offline Persistence Questions

Client side caching and local data persistence strategies for applications, including in memory caches, disk based caches, and mobile platform storage options. Cover offline first design patterns where apps remain usable without network connectivity, synchronization and conflict resolution protocols for syncing local changes back to servers, eventual consistency and freshness trade offs, schema migrations and versioning for local stores, pagination and handling large data sets under device constraints, and platform specific considerations such as iOS (UserDefaults, Core Data, Realm, NSCache) and Android (SharedPreferences, SQLite, Room, Realm). Also include strategies for synchronizing state across views and components, background sync, and strategies to minimize data loss and reduce sync conflicts.

EasyTechnical
96 practiced
Explain read-through, write-through, and write-back caching patterns. For each pattern provide a mobile-specific use case (e.g., caching API responses, local writes queued for sync) and discuss trade-offs in terms of consistency, response latency, network usage, and crash resilience.
EasyTechnical
79 practiced
List and compare the primary client-side storage options available on iOS and Android (e.g., UserDefaults / SharedPreferences, NSCache, SQLite / Core Data / Realm / Room, file storage, keychain/keystore). For each option describe: typical use cases, durability guarantees, performance characteristics, size limits, and security trade-offs. Provide decision criteria for choosing one over another.
MediumTechnical
69 practiced
Design a caching strategy for images and other large media on mobile that balances memory, disk usage, network bandwidth, and startup time. Cover in-memory vs disk-backed caches, thumbnail generation, cache segregation (by quality), eviction heuristics, decoding options, and garbage collection under pressure.
HardTechnical
72 practiced
Compare Conflict-free Replicated Data Types (CRDTs) and Operational Transformation (OT) for enabling convergent multi-device state in mobile apps. Then implement a simple state-based G-Counter CRDT in Kotlin that supports increment and merge operations between replicas.
EasyTechnical
88 practiced
How would you securely persist sensitive items such as OAuth tokens or encryption keys on Android and iOS? Discuss platform APIs (iOS Keychain, Secure Enclave, Android Keystore / EncryptedSharedPreferences), best practices for key derivation and storage, and considerations for backups and restore.

Unlock Full Question Bank

Get access to hundreds of Client Caching and Offline Persistence interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.