Skip to content
masterclass Buddy

System Design · Concept

Cache-Aside

Cache-aside makes the application check the cache first and use the database after a miss. The application then stores the database result in the cache for later reads.

Last updated

Syntax

get(key) → value; if missing: database query → cache.set(key, value)

In-depth API docs are only for subscribers: parameters, examples, common mistakes and interview practice.

Subscribe
  • Write-through
  • Write-behind (write-back)
  • Refresh-ahead
  • Cache
  • When to update the cache

Source: system-design-primer/README.md at master · donnemartin/system-design-primer · GitHub. Checked 2026-11-03.