Cache

Write-behind

You write to the cache, and the cache passes the data to the database later, asynchronously. It's fast, but data can be lost if the cache goes down.

Example

Likes are counted in the cache and flushed to the database every 5 seconds. If the cache goes down, those 5 seconds of likes are lost.

Test yourself: Write-behind

Cache

A social network gets 80,000 «likes» per second. Losing a few isn't serious. Which write strategy does it use?

Lessons that use it

More cache terms

All terms →

Arki, the beaver mascot

Your next interview starts with 5 minutes today.

Free on iOS and Android. Start from zero, no account needed.