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…