topic
Verified 2026-09-18

Cache Freshness and Revalidation

HTTP caches decide whether a stored response is fresh, stale, or reusable after validation.

Use Cache-Control for freshness, ETag or Last-Modified for validation, and no-store for data that must not be stored. no-cache means revalidate, not do not store.

httpcacheperformanceconditional

Reference (http)

Cache-Control: max-age=60, stale-while-revalidate=30
ETag: "v7"

Use Cache-Control for freshness, ETag or Last-Modified for validation, and no-store for data that must not be stored. no-cache means revalidate, not do not store.

Common mistakes

  • Using no-cache when the requirement is to prevent storage entirely.
Permalink: https://merginit.com/reference/http/cache-revalidation