# Choosing among write-through, write-behind, and write-around caching strategies

DevFeed: [Choosing among write-through, write-behind, and write-around caching strategies](<https://devfeed.tech/articles/write-through-write-behind-write-around-picking-wrong-costs-you-consistency-or-throughput-39603.md>)

Original publisher: [Read original article](<https://ankit-rana.com/logs/51-write-through-behind-around/>)

Author: hello@ankit-rana.com

Published: 2026-09-11T00:00:00Z

Content type: tutorial

Language: en

Sources: [Ankit Rana | Mechanical Sympathy](<https://devfeed.tech/sources/ankit-rana-mechanical-sympathy.md>)

Topics: [Caching](<https://devfeed.tech/topics/caching.md>), [Databases](<https://devfeed.tech/topics/databases.md>), [Redis](<https://devfeed.tech/topics/redis.md>), [consistency](<https://devfeed.tech/topics/consistency.md>), [Latency](<https://devfeed.tech/topics/latency.md>)

Tags: [cache](<https://devfeed.tech/tags/cache.md>), [caching](<https://devfeed.tech/tags/caching.md>), [consistency](<https://devfeed.tech/tags/consistency.md>), [database](<https://devfeed.tech/tags/database.md>), [latency](<https://devfeed.tech/tags/latency.md>), [orders](<https://devfeed.tech/tags/orders.md>), [postgres](<https://devfeed.tech/tags/postgres.md>), [redis](<https://devfeed.tech/tags/redis.md>), [strategies](<https://devfeed.tech/tags/strategies.md>), [system-design](<https://devfeed.tech/tags/system-design.md>), [write](<https://devfeed.tech/tags/write.md>), [write-behind](<https://devfeed.tech/tags/write-behind.md>), [write-through](<https://devfeed.tech/tags/write-through.md>)

## AI overview

This article compares write-through, write-behind, and write-around caching strategies. It explains their trade-offs among database latency, cache hit rates, consistency, and the risk of losing acknowledged writes when a process fails.

## Source excerpt

The three write strategies differ in what happens between the cache write and the database write, and that gap is where correctness lives. Write-through updates both before acknowledging, so it is safe and pays the full database latency. Write-behind acknowledges after the cache write and flushes later, which is fast and can lose acknowledged writes if the process dies. Write-around skips the cache entirely on write, which avoids caching data nobody reads and costs a miss on the next read.