Reference · print-friendly

Cache Storage decision playbook

One page for design reviews. Walk top to bottom; stop when a row rejects the current candidate.

1. Gate A · Job (which store?)

If… Prefer…
Re-fetch is cheap; no offline need Memory only (skip durable client store)
Tiny string flags sessionStorage / localStorage (sparingly)
HTTP assets / app shell / resource responses Cache Storage (+ usually a service worker)
Durable structured app data (drafts, entities) IndexedDB
File-shaped editor pipelines OPFS
Must-be-live money / auth actions Network only — honest offline failure

2. Gate B · Warehouse shape (if Cache Storage)

3. Gate C · Policy (service worker)

4. Gate D · Ship risks

5. Sentence template

“We use Cache Storage | IndexedDB | memory | … because job; warehouse is named versions + put/match shape; policy is install/activate + strategy per route; we own one risk (cleanup / opaque / dual-cache / quota).”