return_​cache_​status

Version: v2025-01-13Includes use: Yes

Behavior name: Return Cache Status

Generates a response header with information about cache status.

Note: Status information returned is for a child or child and parent depending on how you manage traffic.

StatusDescription
HitAn object was retrieved from Akamai's cache.
MissAn object was not found in Akamai's cache.
RefreshHitAn object was found in Akamai's cache but was stale. An If-Modified-Since request was made to your origin and received a 304 Not Modified response code.
HitStaleAn object was found in Akamai's cache but was stale. A request to your origin did not return an updated object, so the cache served the stale object to the client.
ConstructedDirectly specified the response to the client.
RedirectRedirected the client to a designated location.
ErrorAn error occurred. Review the error message for more information.

Default behavior

These samples reflect the behavior's default settings. You can use these as is in your configurations or make adjustments based on the behavior's available options.

data "akamai_property_rules_builder" "return_cache_status" {
  rules_v2025_02_18 {
    name     = "Return Cache Status"
    comments = "Generates a response header with information about cache status."
    behavior {
      return_cache_status {
        response_header_name = "Akamai-Cache-Status"
      }
    }
  }
}
"behaviors": [
  {
    "name": "returnCacheStatus",
    "options": {
      "responseHeadername": "Akamai-Cache-Status"
    }
  }
]

Options

Option Description
response_header_name
Specifies the name of the HTTP header in which to report the cache status value.