Caching model
DT8 applies commerce-aware defaults so product media is sticky while account and payment routes stay dynamic.
Default TTLs (Commerce Standard)
| Path pattern | Browser | Edge | SWR |
|---|---|---|---|
/products/*.(jpg|png|webp|avif) | 1d | 7d | 1d |
/collections/* HTML | 0 | 2m | 10m |
/api/catalog/* | 0 | 30s | 2m |
/cart/*, /checkout/* | 0 | bypass | — |
/account/* | 0 | bypass | — |
Cache keys
Default key: scheme + host + path + selected query params (v, width, format). Cookies are ignored unless you enable Vary: Cookie for a route (usually not recommended).
Stale-while-revalidate
When SWR is enabled, the edge can serve a recent object while refreshing from origin in the background — ideal for collection pages during campaigns.
# Example Cache-Control from origin (optional override)
Cache-Control: public, max-age=60, stale-while-revalidate=600