Caching
When and how to cache responses on the client.
When and how to cache responses on the client.
This page lives inside a nested navigation group (Concepts → Patterns → Caching). Use nested groups in docs.json to organise long sections —
the sidebar collapses them by default and remembers your selection in
the URL.
Public, idempotent reads. Never cache requests that depend on the authenticated user unless you key the cache on the user id.
Short TTLs (30s–5min) handle most cases. For data that changes via writes you control, prefer event-driven invalidation over time-based expiry.