System Design Patterns: From Fundamentals to Real Systems
0% completed
Write-Through
1. The Pattern
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 stale for data written this way, because it was part of the write.
The previous two lessons left the application responsible for deleting keys after writes and retaining TTLs as insurance. A TTL is a time to live, so it causes an entry to expire automatically
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%