How to verify application cache indicators using Modheader for Google Chrome
You can debug requests to edge applications by creating headers that return cache indicators using the ModHeader extension for Google Chrome. These headers will return different cache indicators such as page or object cache time and time left for the next expiration.
To verify indicators, follow the steps:
- Install the ModHeader extension by clicking the Add to Chrome button.
- Click the Extensions button on your Google Chrome and select the Modheader extension; the Profile page will appear.
- Select the Request headers item and fill in the fields according to the following information:
- Name: Pragma
- Value: azion-debug-cache
- Click the Pause Modheader icon.
- Restart the extension by clicking the Resume Modheader icon.
Next, follow these steps to enable Developer Tools on Google Chrome to access the information:
- Open Google Chrome.
- Click the Customize and Control Google Chrome button, represented by the ︙ icon on the toolbar.
- Select More Tools > Developer Tools.
- Select the Network tab.
- Access the page in which the information is being cached.
- Select the cached content among the requests.
- Select the Headers tab.
The cache indicators will appear according to the following headers:
Field | Description |
---|---|
X-Cache | Status of the request, which is either HIT, MISS, EXPIRED, UPDATING or STALE. |
X-Cache-Key | Cache key of the object. Normally consists of the combination of host + URI + arguments. |
X-Cache-File | Cache file of the object, consisting of the md5 of the cache key. |
X-Cache-Since | Unix Time Stamp* of when the object enters the cache. |
X-Cache-Expire | Unix Time Stamp* of when the object leaves the cache. |
X-Cache-Expire-In | Time that the object will remain in cache, in seconds. |
X-Cache-Valid | Time set for the object to be in the cache. This time can be set unconditionally on the webserver or can come from the origin via Cache-Control headers. |
X-Cache-Config | ID of the configuration of the virtual host on the webserver. This value is generated by the Azion Console. |
X-Cache-ID | Unique request ID. |
* You can convert Unix Time Stamp into the standard format using the Unix Time Stamp website.
Trademarks
Chrome browser is a registered Google LLC trademark in the United States and/or other countries.