← Lessons

quiz vs the machine

Gold1350

System Design

The Write Around Cache

Sending writes straight to the database and skipping the cache entirely.

4 min read · core · beat Gold to climb

What it is

In a write around cache, writes bypass the cache and go directly to the database. The cache is only populated later, on a read miss, just like cache aside. The written value is not placed into the cache at write time.

Why skip the cache on write

  • Data that is written but rarely read does not pollute the cache.
  • The cache stays focused on the hot read working set, not cold writes.
  • It avoids wasting memory and evictions on one time bulk loads.

The trade off

A key that was just written and then read immediately suffers a cache miss, because the write never cached it. This pattern favors workloads where writes and reads are decoupled in time.

When to use it

Write around fits write heavy data that is read infrequently, such as logs or historical records, where caching every write would only cause churn.

Key idea

Write around keeps the cache clean by writing only to the database, letting reads fill the cache lazily so cold writes never crowd out hot data.

Check yourself

Answer to earn rating on the learn ladder.

1. Where do writes go in a write around cache?

2. What workload best fits write around?