The debug cache response headers provide additional information about the cache policy applied to the requested asset.
The response sent from our edge servers to a user will only include debug cache response headers when the following conditions are true:
Request debug cache response headers by setting the X-EC-Debug request header to the desired debug cache response headers:
Syntax:
Example:
Valid debug cache header values are provided below.
Request Header | Type |
---|---|
x-ec-cache |
|
x-ec-cache-remote |
|
x-ec-check-cacheable |
|
x-ec-cache-key |
|
x-ec-cache-state |
The following response headers identify a server and how it handled the response:
Response Header | Description |
---|---|
x-ec-cache |
This response header is reported whenever content is routed through the CDN. It identifies the edge server that fulfilled the request. |
x-ec-cache-remote |
This response header is only reported when the requested content was cached on an CAN Gateway server. |
The format through which the x-ec-cache and x-ec-cache-remote response headers will report cache status code information is indicated below.
The terms used in the above response header syntax are defined below:
The TCP_DENIED status code may be reported instead of NONE when an unauthorized request is denied due to Token-Based Authentication. However, the NONE status code will continue to be used when viewing Cache Status reports or raw log data.
POP: Indicates the POP that handled the request.
The following sample response headers provide cache status code information for a sample request.
The x-ec-check-cacheable response header indicates whether the requested content could have been cached.
This response header does not indicate whether caching took place. Rather, it simply indicates whether the request was eligible for caching.
The format through which the x-ec-check-cacheable response header will report whether a request could have been cached is indicated below.
The term used in the above response header syntax is defined below:
Value | Description |
---|---|
YES |
Indicates that the requested content was eligible for caching. |
NO |
Indicates that the requested content was ineligible for caching. This may be due to one of the following reasons:
|
UNKNOWN |
Indicates that our servers were unable to assess whether the requested asset was cacheable. This typically occurs when the request is denied due to Token-Based Authentication. |
The following sample response header indicates whether the requested content could have been cached.
The x-ec-cache-key response header indicates the physical cache-key associated with the requested content. A physical cache-key consists of a path that identifies an asset for the purposes of caching. In other words, our servers will check for a cached version of an asset according to its path as defined by its cache-key.
This physical cache-key starts with a double forward slash (i.e., //) followed by the protocol used to request the content (i.e., http or https). This protocol is followed by the relative path to the requested asset. This relative path starts with the content access point (e.g., /000001/).
By default, HTTP platforms are configured to use "standard-cache." This means that query strings are ignored by the caching mechanism. This type of configuration will prevent the cache-key from including query string data.
If a query string is recorded in the cache-key, it will be converted to its hash equivalent. After which, it will be inserted between the name of the requested asset and its file extension (e.g., assetHashValue.html).
The format through which the x-ec-cache-key response header will report physical cache-key information is indicated below.
The following sample response header indicates the physical cache-key for the requested content.
The x-ec-cache-state response header indicates the cache state of the requested content at the time it was requested.
The format through which the x-ec-cache-state response header reports cache state information is indicated below.
The terms used in the above response header syntax are defined below:
max-age Time Period: Converts the max-age value (i.e., MASeconds) to the approximate equivalent of a larger unit (e.g., days).
Remaining TTL Time Period: Converts the remaining TTL value (i.e., Remaining TTL Seconds) to the approximate equivalent of a larger unit (e.g., days).
The following abbreviations are used for time units.
Abbreviation | Description |
---|---|
s |
Seconds |
h |
Hour(s) |
d |
Day(s) |
m |
Month(s) |
y |
Year(s) |
The following sample response header indicates the cache state of the requested content at the time that it was requested.
Edgecast CDN