HTTP response guides

Compare Cache Policy With Recorded CDN Outcomes

·

Save the response headers from the requests you want to compare. A declared lifetime describes a reuse policy. A Cache-Status observation describes what a named cache reported for the recorded exchange.

Caching Header Analyzer

Compare the map bundle and the event preview

Load Two responses with different cache policies and analyze at the default 60-second review threshold. Response 1 is the map bundle. Its Age is 150 seconds, past the private 120-second lifetime. The shared 300-second lifetime has 150 seconds left. The recorded Cache-Status member reports a hit and a 150-second TTL.

Select Response 2. The preview declares a 30-second lifetime and no-cache, which requires validation before reuse even while the snapshot is fresh. The analyzer flags the short lifetime and the missing validators. The captured CDN field reports a miss. The summary reports one hit in these two observations.

RFC 9111 freshness and Cache-ControlRFC 9211 Cache-Status field

Check which cache reported the outcome

A recorded Cache-Status chain can contain several caches. Read its members in field order, where the final member describes the closest listed cache to the client. The sample count uses that recognized result or falls back to CF-Cache-Status and then X-Cache.

Load Recorded retry limit to see a collection annotation. It stays separate from the observed cache fields. Check whether your sample captures enough repeated requests before drawing conclusions about traffic.

RFC 9211 Cache-Status field

Choose a lifetime and validator for this resource

Confirm whether the path changes every time its content changes. A fingerprinted public bundle can often use a longer explicit lifetime. For a frequently edited response, choose a lifetime based on acceptable delay and check that a usable ETag or Last-Modified is recorded when clients revalidate.

Save a later capture from the same route and compare the two JSON reports. Check each field's source line and the recorded response status. URL credentials, queries and fragments are withheld from the exported address.

RFC 9111 freshness and Cache-ControlRFC 9110 HTTP dates and validators

Common questions

Can a header capture tell me my production hit ratio?

It gives the hit count among supplied responses with recognized observations. Use measured traffic from your cache provider for the overall ratio.

Why does the freshness snapshot say unavailable?

It needs a valid recorded Age and a usable lifetime. Conflicting directives and incomplete date fields can leave the applicable lifetime unavailable.

Sources

Put it into practice.

Related guides