Mapfable
Read-only flowchart
View
All flow
Before this step
After this step
Show route
From
Choose a step
To
Choose a step
Show route
Motion
Animate connections
Visual connection guide only. It does not run the system.
JavaScript is disabled. The complete diagram is visible below; interactive viewing requires JavaScript.
Cache & Request Flow
Follow a cache-aside read from an authorized request to a fast hit or a fresh origin response.
{"title":"Cache & Request Flow","description":"Follow a cache-aside read from an authorized request to a fast hit or a fresh origin response.","graph":{"direction":"LR","nodes":[{"id":"request","type":"io","label":"Resource request","description":"Request a resource by its stable identifier. Authentication and access checks still run even when the resource is present in the cache.","group":"","basis":"unknown","category":"frontend","groupId":"client","position":{"x":80,"y":230},"sources":[{"repository":"","path":"","revision":"","note":"Authored reference design for explaining system behavior. It describes a possible implementation, not production telemetry or an observed incident."}]},{"id":"response","type":"terminal","label":"Resource delivered","description":"Receive the same public response shape from either the cache-hit path or the origin path. A cache hit changes latency, not authorization.","group":"","basis":"unknown","category":"frontend","groupId":"client","position":{"x":80,"y":800},"sources":[]},{"id":"authorize","type":"process","label":"Authorize request","description":"Verify the session and authorize this resource. Build a tenant-scoped, versioned cache key. Unauthorized calls are rejected before the path shown here continues.","group":"","basis":"unknown","category":"backend","groupId":"application","position":{"x":480,"y":230},"sources":[]},{"id":"cache_hit","type":"decision","label":"Cache hit?","description":"A fresh, usable value takes the fast path. Missing, expired or invalid cache content falls back to the origin; a cache outage also uses the fallback policy.","group":"","basis":"unknown","category":"backend","groupId":"application","position":{"x":850,"y":458},"sources":[]},{"id":"serialize","type":"process","label":"Build response","description":"Serialize the authorized data into one stable response schema. The hit and miss paths merge here before the response is returned.","group":"","basis":"unknown","category":"backend","groupId":"application","position":{"x":850,"y":800},"sources":[]},{"id":"cache_store","type":"datastore","label":"Resource cache","description":"Read a key scoped to tenant, resource and schema version. Values expire after a bounded TTL; this store does not replace the authoritative database.","group":"","basis":"unknown","category":"database","groupId":"storage","position":{"x":1270,"y":230},"sources":[]},{"id":"load_origin","type":"process","label":"Load from origin","description":"Load the authorized resource from the repository. Missing records and origin errors return their defined error response rather than being cached as a successful resource.","group":"","basis":"unknown","category":"backend","groupId":"storage","position":{"x":1270,"y":500},"sources":[]},{"id":"database","type":"datastore","label":"Primary database","description":"Authoritative resource state. The lookup preserves tenant and authorization constraints, regardless of whether the cache is available.","group":"","basis":"unknown","category":"database","groupId":"storage","position":{"x":1610,"y":500},"sources":[]},{"id":"populate","type":"process","label":"Refresh cache","description":"Attempt to store the fresh value with a bounded TTL, then pass the origin payload to response serialization. A cache write failure must not discard a valid origin response.","group":"","basis":"unknown","category":"backend","groupId":"storage","position":{"x":1270,"y":800},"sources":[]}],"edges":[{"id":"incoming","source":"request","target":"authorize","label":"Request","description":"","basis":"unknown","sourceHandle":"right","targetHandle":"left","sources":[]},{"id":"lookup_cache","source":"authorize","target":"cache_store","label":"GET key","description":"","basis":"unknown","sourceHandle":"right","targetHandle":"left","sources":[]},{"id":"lookup_result","source":"cache_store","target":"cache_hit","label":"Lookup result","description":"","basis":"unknown","sourceHandle":"bottom","targetHandle":"top","sources":[]},{"id":"hit_response","source":"cache_hit","target":"serialize","label":"Hit","description":"","basis":"unknown","sourceHandle":"bottom","targetHandle":"top","sources":[]},{"id":"miss_origin","source":"cache_hit","target":"load_origin","label":"Miss","description":"","basis":"unknown","sourceHandle":"right","targetHandle":"left","sources":[]},{"id":"query_origin","source":"load_origin","target":"database","label":"Read","description":"","basis":"unknown","sourceHandle":"right","targetHandle":"left","labelOffset":{"x":15,"y":-40},"sources":[]},{"id":"origin_record","source":"database","target":"populate","label":"Fresh record","description":"","basis":"unknown","sourceHandle":"bottom","targetHandle":"right","sources":[]},{"id":"store_value","source":"populate","target":"cache_store","label":"SET + TTL","description":"Refresh the cache as a best-effort side effect. The next request may use this value; this is not a second read in the current request.","basis":"unknown","sourceHandle":"right","targetHandle":"right","sources":[]},{"id":"fresh_response","source":"populate","target":"serialize","label":"Origin payload","description":"","basis":"unknown","sourceHandle":"left","targetHandle":"right","sources":[]},{"id":"return_response","source":"serialize","target":"response","label":"Response","description":"","basis":"unknown","sourceHandle":"left","targetHandle":"right","sources":[]}],"groups":[{"id":"client","label":"Client","description":"An authorized caller requests a resource and receives one response."},{"id":"application","label":"Request handling","description":"Access control, cache-result branching and consistent response serialization."},{"id":"storage","label":"Cache & origin","description":"Cache-aside storage: the database remains the source of truth; fresh values are stored with a bounded lifetime."}]},"investigation":null}
MAPFABLE · FLOWCHART
Cache & Request Flow
Follow a cache-aside read from an authorized request to a fast hit or a fresh origin response.
Frontend
Backend service
Database & storage
Client
Client
2 steps
Request handling
Request handling
3 steps
Cache & origin
Cache & origin
4 steps
Request
GET key
Lookup result
Hit
Miss
Read
Fresh record
SET + TTL
Origin payload
Response
Resource request
Frontend
Resource request
Resource delivered
Frontend
Resource delivered
Authorize request
Backend service
Authorize request
Cache hit?
Backend service
Cache hit?
Build response
Backend service
Build response
Resource cache
Database & storage
Resource cache
Load from origin
Backend service
Load from origin
Primary database
Database & storage
Primary database
Refresh cache
Backend service
Refresh cache
Request
GET key
Lookup result
Hit
Miss
Read
Fresh record
SET + TTL
Origin payload
Response
Read-only snapshot · Status reflects the included evidence, not live monitoring.
−
+
Fit whole diagram
All flow