rfc-9875

HTTP Cache Groups

M. Nottingham
date2025-10 streamIETF areawit wghttpbis statusPROPOSED STANDARD pages6 canonicalhttps://www.rfc-editor.org/rfc/rfc9875 doi10.17487/RFC9875
This specification introduces a means of describing the relationships between stored responses in HTTP caches, grouping them by associating a stored response with one or more strings.

Extracted elements (18)

design-rationale §1

Cache group membership is determined by string equality (case-sensitive) rather than URL structure or other resource relationships, providing a dedicated mechanism for expressing relationships that is independent of URL design choices.

http

design-rationale §1

Cache groups operate within a single cache and only across stored responses from the same origin server. The mechanism intentionally does not address synchronisation between multiple caches or association of responses from different origins.

http

design-rationale §2

Group strings are opaque to caches — the cache has no insight into their structure or content beyond using them to uniquely identify a group. This avoids requiring the cache to parse or interpret application-level semantics.

http

design-rationale §2.2.1

Grouped invalidation explicitly does not cascade: invalidating a group member does not trigger further group invalidations. This prevents potentially unbounded or unintended invalidation chains.

http

design-rationale §1

In addition to invalidation, group relationships can be used by caches to optimize operation such as informing cache eviction algorithms, making grouping useful beyond just explicit invalidation events.

http

interoperability-note §3

Cache extensions can explicitly strengthen the MAY requirement for Cache-Group-Invalidation into a required obligation for caches that process those extensions, allowing targeted cache control to mandate invalidation.

http

interoperability-note §2.2.1

Cache extensions (e.g., targeted cache control header fields per RFC 9213) can explicitly strengthen the MAY requirement for grouped invalidation into a stronger obligation for caches that process those extensions.

http

normative-requirement §2.2.1 MAY

A cache that invalidates a stored response MAY invalidate any stored responses that share groups with that response. Grouped invalidations do not cascade — further grouped invalidations are not triggered by a grouped invalidation.

http

normative-requirement §3 MAY

A cache that receives a Cache-Group-Invalidation header field on a response to an unsafe request MAY invalidate any stored responses sharing groups with any of the listed groups.

http

normative-requirement §2.1 MUST

Group membership requires matching the same URI origin (per HTTP Section 4.3.1) in addition to matching the Cache-Groups string. Responses from different origins cannot share a group.

http

normative-requirement §3 MUST

Implementations MUST support at least 32 groups in a Cache-Group-Invalidation field value, with up to at least 32 characters in each member.

http

normative-requirement §3 MUST

The Cache-Group-Invalidation header field MUST be ignored on responses to requests that have a safe method (e.g., GET). Only unsafe request responses may carry meaningful Cache-Group-Invalidation signals.

http

protocol-element §3

The Cache-Group-Invalidation response header field is a List of Strings (Structured Fields). Each member identifies a group that the response invalidates, allowing a state-changing response to trigger invalidation of related cache groups.

http

protocol-element §2

The Cache-Groups response header field is a List of Strings (per Structured Fields). Each member identifies a group that the response belongs to. These strings are opaque to the cache and used solely to identify group membership.

http

protocol-element §2.1

Two stored responses belong to the same group when they both contain a Cache-Groups field with the same String (case-sensitive, character-by-character comparison) and both share the same URI origin.

http

registry §4

IANA has added two permanent entries to the HTTP Field Name Registry: 'Cache-Groups' and 'Cache-Group-Invalidation', both referencing RFC 9875.

http, registry

security-consideration §5

This mechanism allows resources sharing an origin to invalidate each other. In shared hosting environments where one origin represents multiple parties, one party could group its resources with another party's resources or send Cache-Group-Invalidation signals that have side effects on them. Shared hosts can mitigate this by controlling access to these header fields.

http, security

wire-format §2

Both Cache-Groups and Cache-Group-Invalidation are encoded as Structured Fields List of Strings. The ordering of members is not significant, and unrecognised Parameters are to be ignored.

http