IT lexicon › Hardware › Write cache

Write cache

Hardware På svenska → Updated: 2026-05-27

Buffer in disk/controller that accepts writes to RAM before they reach permanent media. Massive performance gain but risk: power loss → data lost if the buffer isn't battery-backed.

Enterprise RAID controllers: BBU (Battery Backup Unit) or supercapacitor + flash make the cache "non-volatile". Consumer SSDs: power-loss protection (PLP) circuit preserves the cache on outage — cheap drives lack it, often not advertised. PostgreSQL fsync has existential faith that the disk actually writes — if a disk lies ("write completed!" while in cache without PLP) corruption can occur. This happened in 2011: Crucial m4 had a buggy fsync. SQLite + ext4 + barriers is current best practice. ZFS sets a cache flush per transaction explicitly.

← Back to the lexicon