Databases Intermediate By Samson Tanimawo, PhD Published Oct 23, 2026 9 min read

Redis as Cache vs As Database: When Each Fits

Redis is the multi-tool of databases. Knowing when to use which mode prevents mismatched-workload pain.

Cache mode vs DB mode

Cache mode: data may be lost; performance is everything; refill from source-of-truth.

DB mode: data must persist; durability matters; performance still matters.

Four criteria

Persistence options

RDB: snapshot at intervals; lose data between.

AOF: write log; near-zero loss; slower writes.

RDB+AOF: best of both at cost of disk.

Failure modes

Cache mode: cache miss on Redis-down is OK; app falls back to source.

DB mode: Redis-down = outage. Plan for HA, backups, failover.

Antipatterns

What to do this week

Three moves. (1) Apply this pattern to your most-loaded table. (2) Measure query latency / write throughput before/after. (3) Document the win and the constraint so the next refactor inherits the knowledge.