Ravi Sir's Cards › AWS
Who writes the cache?
This comparison card contrasts Who writes the cache. Cache-aside: App reads DB on miss, then fills cache. Write-through: App writes DB and cache together on update. The card pairs Cache-aside with most web read paths, and Write-through with when stale cache is costly.
Read card text
What this card says
Who writes the cache?
Cache-aside
App reads DB on miss, then fills cache.
Write-through
App writes DB and cache together on update.
Key points
Product catalog reads.
Strictly fresh profile fields.
Example
get→miss→DB→SET / write DB + SET same request
Use when
Most web read paths.
When stale cache is costly.