GET user:42missSELECT user 42rowSET user:42APIRedisDatabase
Sequenceblueprint

Cache Miss and Fill

A sequence diagram of a cache miss: the API asks Redis, gets nothing, reads the database, and writes the value back.

Start from this template

Opens in the editor. No signup. Export SVG, PNG, or an embed link.


Source text
title: Cache Miss and Fill
theme: blueprint
type: sequence
participant api "API"
participant cache "Redis"
participant db "Database"
api -> cache : "GET user:42"
cache --> api : "miss"
api -> db : "SELECT user 42"
db --> api : "row"
api -> cache : "SET user:42"

About this template

A sequence diagram of a cache miss. The API asks Redis for user:42, gets a miss, reads the row from the database, and writes it back to Redis so the next request is a hit.

It is the step-by-step version of the Cache-Aside Read Path template. Use it when the order of calls matters, for example when you discuss what happens if two requests miss at the same time.

Change the key and query to a real example from your system. Concrete keys like user:42 make the diagram easier to follow than generic labels.