Visual RFC.
ALL RFCs / RFC 9111
Read the RFC ↗
RFC 9111 / CACHE DECISIONS

Store and select a response

01

A cache first decides whether storage is permitted, then whether a stored response matches a later request.

RFC 9111 · § 3EXAMPLE
3 / 3
03
Choose the matching stored variant.

A JSON-preferring request must not accidentally receive a variant selected for HTML.

Store and select a responseAn eligible origin response is stored with a URI and Vary metadata; a later request chooses the JSON variant instead of the HTML variant.Storage and selection are separate decisionsIllustrative cacheable GET /guide responseOrigin response200 OK · Cache-Control: max-age=60Vary: AcceptStored variant keyGET /guide · Accept: application/jsonGET /guide · Accept: text/htmlMatch method, target URI, and Vary inputsChoose the matching representation for this request

Key idea: A stored answer still needs a valid reuse decision.

Terms

Look up a term in the glossary ↗

Rules & examples
  • Storage requires the understood method and applicable status, directive, and authentication conditions in §3.
  • The primary cache key includes method and target URI; common GET caches often key primarily by URI.
  • Vary requires comparing the nominated request fields before selecting a stored variant. Vary: * never matches without validation.

A cache can decline to store an otherwise cacheable response. Partial and authenticated responses have additional rules. The diagram shows an eligible ordinary GET response.

Sources
Protocol participantThreat or exceptionProtocol controlSimplified drawings · precise section references
New to this? Start hereA quick picture + helpful background

A request starts a conversation.

A client asks for a resource. A server sends a response. The method, address, headers, and status explain what that conversation means.

Helpful first, if these ideas are unfamiliar

These pictures are analogies to help you learn. The linked RFC explains the actual rules.

Related RFCs and changes

“Updates” changes part of an earlier RFC. “Obsoletes” replaces it. This list shows selected related documents.

All chapters in RFC 9111

Drawing view

Scroll the drawing to see every part. Playback controls stay above it.

RFC 9700 / CHAPTERS

Chapters

For full details, tables, algorithms, and exceptions, read the original RFC.

RFC status and corrections ↗