System Design Patterns: From Fundamentals to Real Systems

0% completed

Write-Through

The Pattern

Writes go through the cache, and the cache writes to the database synchronously: the caller isn't 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 module intro's anchor: correct the sticky note and the file, before telling anyone "done." Nobody who checks the sticky note can ever see an out-of-date correction, because updating it wasn't an afterthought: it was part of the act.

Where the previous two lessons left writes as "your chore" (delete-on-write, TTL insurance

.....

.....

.....

Like the course? Get enrolled and start learning!