System Design Patterns: From Fundamentals to Real Systems
0% completed
Write-Through
1. The Pattern
This pattern is called write-through because every write passes through the cache on its way to the database.
Writes go through the cache. The cache writes to the database synchronously, meaning the caller waits for that write. The caller is not told "done" until both the copy and the original are updated. The cache is never out of date (stale) for data written this way, because it was part of the write.
Read the diagram from top to bottom. The application sends a new price for product 8412 to the cache. The cache sends a synchronous `UPDATE
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%