Visual RFC.
ALL RFCs / RFC 5861
Read the RFC ↗
RFC 5861 / STALE CACHE CONTROLS

Stop fallback when the allowance ends

04

A stale-if-error limit measures time after freshness ends. A later failure beyond that allowance cannot use this example’s fallback.

RFC 5861 · § 4.1EXAMPLE
3 / 3
Stop fallback when the allowance endsA schematic max-age 600 plus stale-if-error 1200 window compares an earlier request at Age 900 with a later request at Age 1801. The later response is 1201 seconds stale, outside this allowance. With no other permission the origin 500 passes through the cache to the client; no stale 200 is sent.Measure time since freshness endedmax-age=600 · stale-if-error=1200Later request uses the same stored responsefresherror allowance06001800Age 18011801 − 600 = 1201s staleOutside this allowance; no other permissionClientCacheOrigin500500Forward the origin 500; do not send stored 200Example seconds · schematic, not to scale
03
Pass the actual error to the client.

Origin 500 travels through the cache to the client. No stored 200 is sent and Age is not reset.

Source for this drawing: RFC 5861 · Read RFC section 4.1 ↗

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

A message needs an address.

Think of a packet as a small addressed envelope. Devices pass it onward; transport protocols decide what delivery promises an application gets.

Helpful first, if these ideas are unfamiliar

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

Terms in this drawing
Freshness lifetime
The interval during which a stored response is fresh, such as max-age=600.
Staleness
How far the response is past its freshness lifetime; Age minus 600 in this example.
Related RFCs and changes

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

KEY POINT

Freshness lifetime plus stale allowance sets this example’s outer age bound.

  • For max-age=600 and stale-if-error=1200, 600 seconds of freshness plus 1200 seconds of staleness reaches Age 1800. At Age 900, only 300 seconds of the stale allowance have been used.
  • The general rule is that a response more stale than the stated limit SHOULD NOT satisfy the request absent other information. Do not turn that qualified SHOULD NOT into an unconditional new MUST.
  • The RFC example says to pass the error through after age is greater than 1800 seconds. This scene chooses Age 1801 and assumes no other reuse permission: 1201 seconds stale is beyond the allowance, so the cache forwards the origin’s 500 instead of its stored 200.
DETAILS

The same cached response ages between separate incoming requests: the earlier eligible error case was Age 900; a later request finds Age 1801. It still has max-age=600 and stale-if-error=1200. Crossing the limit does not reset Age or imply the cache was deleted. With another applicable policy the decision must be evaluated again; these examples do not bypass current explicit prohibitions in RFC 9111 §4.2.4.

Read the RFC section ↗

All chapters in RFC 5861

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 ↗