Interview Databases & Caching

What is the difference between Redis as a cache and Redis as a primary datastore?

Databases & Caching · Advanced level

Answer

Redis as a cache is rebuildable from another source of truth. Redis as a primary datastore is authoritative, so persistence, backup, failover, no unsafe eviction, and recovery testing become mandatory.

Technical explanation

Cache data should be safely rebuildable from a durable source.

Primary-store data needs persistence, backups, no unsafe eviction, HA, and restore testing.

Financial records and durable ledgers should usually live in a transactional database, not only Redis.

Hands-on example

Classification:

Product details copied from RDS: cache.

User sessions: needs datastore-level HA policy.

Billing counters: needs durable queue, DB write, or reconciliation.

Set eviction to noeviction if data must not disappear.

Preparing for an interview?

Check how well your resume matches the role with our free resume checker— match score, ATS check, and the skills you're missing.

More Databases & Caching interview questions

← All Databases & Caching questions