Fundamentals · Medium · Free
How is Redis used as a cache in front of a database?
FresherFundamentalsDatabase Fundamentals
Redis cache-aside
For How is Redis used as a cache in front of a database, interviewers listen for a crisp definition, how the pieces interact in a real system, and one trade-off or failure mode you have seen or would guard against.
diagram
read: app → Redis hit? return : DB → populate Redis
write: update DB → invalidate cache keyTTL prevents stale forever; watch cache stampede on hot keys.