HTTP Freshness, Validators, and Cache Keys

Distinguish reuse of a fresh response from validation of an older representation and preserve variation across request headers.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. A cached representation has a key and a reuse policy
  2. A stale copy can be revalidated

A cached representation has a key and a reuse policy

A cache can reuse a stored response while fresh under the applicable directives. It also must associate the response with request dimensions determining the representation, including headers named by Vary where applicable. An English and German response can be different variants of one URL. Private or authorization-sensitive responses need the intended sharing policy. Freshness and cache key selection are separate checks.

A stale copy can be revalidated

An entity tag can identify a representation for a conditional request. If validation shows the cached representation is still suitable, a 304 response can update metadata without retransmitting its body, under the protocol rules. Correct validator scope matters across distinct variants. DNS caching uses TTLs for a different layer. Service identity concerns trust in the connection, while freshness describes reuse of responses.[1]

References

  1. IETF, RFC 9111: HTTP Caching ↩