Write-Back — write to cache, async to DB. Write-Through — write to cache and DB.
Write-Back (Write-Behind):
Write-Back:
App → Cache (fast)
→ DB (async)
(Fast, possible data loss)
Write-Through:
Write-Through:
App → Cache → DB (simultaneously)
(Consistent, slower)
Key differences: