Software Design

Cache-Aside Read Flow on Cache Miss

UML Sequence Diagrams · made in Skemio

UML sequence diagram showing a Client, App Service, Redis, and DB handling a cache miss and backfill.
UML sequence diagram showing a Client, App Service, Redis, and DB handling a cache miss and backfill.

What it shows

  • The application queries cache directly; the cache never queries the DB.
  • On a miss, the application loads from PostgreSQL and backfills Redis.
  • Always set TTLs during backfill to avoid stale records in the cache layer.

The takeaway

Cache-aside keeps storage and caching decoupled by making application code orchestrate sync.

More uml sequence diagrams