Skip to content
All concepts

Concept

Cache-aside

Cache-aside is the most common way to use a cache: the application checks the cache first, and on a miss it reads the database and writes the value into the cache itself. The cache only ever holds what someone has asked for. The application is also responsible for removing or expiring an entry when the data changes.

Watch requests check the cache first and go to the database only on a miss. A live step from the lesson Cache stampede (Redis / caching). Timings and counts are illustrative.

Where you'll see it

Sources: Scaling Memcache at Facebook (NSDI '13) ↗ · Facebook outage, 2010 ↗ · Report a problem

The definition is in our own words; the sources are those of the lesson Cache stampede.