Verify cache indicators
You can debug requests to your applications by sending the HTTP header Pragma: azion-debug-cache. This header instructs Azion’s edge servers to return detailed indicators about the cache state in the response headers.
Checking indicators with cURL
The fastest and recommended way to check the indicators is to use cURL directly in your terminal:
- Open your terminal.
- Run the command below, sending the
Pragma: azion-debug-cacheheader (replace the example URL with your application’s URL):
curl -I -H "Pragma: azion-debug-cache" https://www.example.comTip: The
-Iflag requests only the HTTP response headers, making it easier to quickly read the cache data without downloading the page body.
- Inspect the returned response. Azion’s indicators will be listed under headers starting with
X-Cache.
Alternative: Google Chrome DevTools (native)
If you prefer to inspect headers through the browser without using third-party extensions:
- Open Google Chrome and navigate to the desired page.
- Open Developer Tools by pressing
F12(orCtrl+Shift+I/Cmd+Option+I). - Go to the Network tab.
- Reload the page (
F5). - Select the main request from the list and navigate to the Headers tab.
- Look for response headers starting with
X-Cache.
Cache indicators table
When you send the debug header, Azion returns the following fields in the HTTP response:
| Field | Description |
|---|---|
| X-Cache | Status of the request: 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 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 Azion Console. |
| X-Cache-ID | Unique request ID. |
* You can convert a Unix Time Stamp into a human-readable format using the Unix Time Stamp website.
Trademarks
Chrome browser is a registered Google LLC trademark in the United States and/or other countries.