Caching · Flashcard

Walk through a read with the cache-aside pattern.

easy

Answer

  1. The app looks up the key in the cache.
  2. On a hit, it returns the value.
  3. On a miss, it reads the database, writes the value into the cache (with a TTL) and returns it.

The cache holds only what was asked for, and the app owns all the logic.

Review this in your daily deck All cards in Caching