Last update:2026-10-19 14:31:46
Cache Optimization controls CDN edge caching for HTTP segmented delivery, such as HLS and DASH, and query string handling in cache keys and origin requests.
Note: Cache Optimization is available only for delivery domains configured with origin-pull.
Cache rules define how long CDN edge servers cache matching resources. Rules are evaluated by priority; a higher priority value is matched first.
| Field | Required | Description |
|---|---|---|
| Rule Scope | Yes | Select the resource scope: Specific File Type, Specific Directory, or URL Regular Expression. |
| Cache TTL | Yes | Enter the cache duration and select the time unit. |
| Priority | Yes | Set the match priority. A higher value has higher priority. Default: 10. |
After the rule is added, it appears in the Cache Rules list with its scope, cache TTL, and priority.
Select a Rule Scope option based on the resources you want the rule to match:
| Option | Use case | Input rule | Example |
|---|---|---|---|
| Specific File Type | Cache files by extension, regardless of path. | Enter extensions without dots. Separate multiple extensions with semicolons. Use letters and numbers only. | m3u8;mpd;ts;m4s |
| Specific Directory | Cache resources under one or more directory paths. | Enter one directory path per line. Each path must start and end with /. |
/live/123/ |
| URL Regular Expression | Cache resources that match a regular expression. | Enter the path-matching part of the regular expression. Do not include the protocol or domain. | live/.*\.(m3u8\|mpd\|ts\|m4s)($\|.*) |
For URL Regular Expression, the platform automatically prepends
^https?://[^/]+/to the pattern.
Query string rules control whether query parameters form part of the cache key and whether the CDN forwards them to origin. These are separate settings: ignoring parameters in the cache key does not necessarily remove them from origin requests.
| Field | Required | Default | Description |
|---|---|---|---|
| Rule Scope | Yes | - | Select the resource scope: Specific File Type, Specific Directory, or URL Regular Expression. |
| Ignore Query String | Yes | Yes | Select Yes to let URLs with different query strings share one cached copy. Select No to cache each unique query string separately. |
| Remove Query String from Origin Requests | Yes | Yes | Select Yes to strip the query string before forwarding the request to origin. Select No to forward the query string to origin. |
| Case-Insensitive Match | Yes | Yes | Select Yes to ignore letter case during matching. |
| Priority | Yes | 10 |
Set the match priority. A higher value has higher priority. |
| Goal | Ignore Query String | Remove Query String from Origin Requests |
|---|---|---|
| Share one cached copy across all query string variants and send a clean URL to origin. | Yes | Yes |
| Share one cached copy across all query string variants and send the full URL to origin. | Yes | No |
| Cache each query string variant separately and send a clean URL to origin. | No | Yes |
| Cache each query string variant separately and send the full URL to origin. | No | No |
After confirming a rule or changing a switch, review the configuration. Save Draft saves your work as a draft. To continue through review and submission, choose Next and follow the console prompts. Before testing, check the domain’s configuration status and confirm that the changes have taken effect.
Live playlists and manifests update frequently. Choose a short TTL that matches their update cadence so players can obtain current versions. Media segments can use a longer TTL when their content does not change.
Review the domain’s existing Cache Rules and priorities before changing TTLs.