Glossary

Write-Through Cache

Every write goes to the cache and the database together, so the cache is always warm and consistent.

1 min read·4 sections
Open the interactive version → diagrams, practice & more

Definition

Every write goes to the cache and the database together, so the cache is always warm and consistent.

How it works

Reads are always fast and never stale, at the cost of write latency (two writes) and caching data that may never be read. Often paired with a read-through cache. The riskier cousin, write-back, acknowledges from the cache and flushes to the DB later — faster writes, but data loss if the cache dies.

Common questions

What is Write-Through Cache?

Every write goes to the cache and the database together, so the cache is always warm and consistent.

How does Write-Through Cache work?

Reads are always fast and never stale, at the cost of write latency (two writes) and caching data that may never be read. Often paired with a read-through cache. The riskier cousin, write-back, acknowledges from the cache and flushes to the DB later — faster writes, but data…

What is Write-Through Cache used for in system design?

Reads are always fast and never stale, at the cost of write latency (two writes) and caching data that may never be read. Often paired with a read-through cache. The riskier cousin, write-back, acknowledges from the cache and flushes to the DB later — faster writes, but data…

Part of Glossary on SystemLore — system design explained with 148 deep topics, interactive diagrams, and a build-it-yourself game. Browse the glossary and "X vs Y" comparisons, or build this one →