Return Cache Status
This behavior generates a response header with information about cache status.
How it works
This behavior can provide information whether the response came from the Akamai cache, or from the origin server. Status values report with either of these forms of syntax, depending on whether you're deploying traffic using SiteShield or Tiered Distribution which may result in the request going through both a child
and parent
Akamai Technologies, Inc. server:
{status} from child
{status} from child, {status} from parent
The status
value can be any of the following:
-
Hit
: The object was retrieved from Akamai's cache. -
Miss
: The object wasn't found in the Akamai cache. -
RefreshHit
: The object was found in Akamai's cache, but was stale, so anIf-Modified-Since
request was made to the customer origin, with 304 as the response code, indicating unmodified content. -
HitStale
: The object was found in Akamai's cache and was stale, but a more recent object wasn't available from the customer's origin, so the cache served the stale object to the client. -
NotCacheable
: The object is defined as not cacheable in your property, so Akamai servers always forward requests for it to your origin server. -
Constructed
: The Construct response behavior directly specified the response to the client. -
Redirect
: The Akamai edge configuration specified a redirect, typically by executing the Redirect, Redirect Plus, or Edge Redirector Cloudlet behaviors. -
Error
: An error occurred, typically when authorization is denied or the request is rejected by the Web Application Firewall (WAF).
Features and options
Field | What it does |
---|---|
Response Header name | Specifies the name of the HTTP header in which to report the cache status value. |
Examples
If an Akamai edge server receives a request for a cacheable object, such as a web page, and the object isn't in its cache, it forwards the request to your origin server. The edge server returns the object from your origin with the header set to Miss from child
for this request. However, as the requested object is cacheable, the edge server adds it to their cache, so that subsequent requests for the same object to the same edge server will return the object from the edge server's cache with the header set to Hit from child
.
Tiered Distribution and SiteShield only: if the Akamai child
server that first received the request doesn't have an object in its cache and forwards the request to a second parent
server, where the object is found in cache, the header will return Miss from child, Hit from parent
. As the requested object is cacheable, the child edge server adds it to their cache, so that subsequent requests for the same object will return Hit from child
.
Updated 11 months ago