Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/content/docs/cache/how-to/cache-keys.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Custom cache keys let you precisely set the cacheability setting for any resourc
7. You can also select settings for **Headers**, **Cookie**, **Host**, and **User**.
8. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.

:::note
When [URL normalization](/rules/normalization/) is enabled, we recommend also enabling [Normalize URLs to origin](/rules/normalization/manage/), especially if you are setting custom cache keys or using cache by device type, which also modifies the cache key. This helps ensure the URL in the cache key matches the URL sent to the origin, preventing cache poisoning and ensuring consistent behavior.
:::

## Cache Key Template

There are a couple of common reasons to change the Cache Key Template. You might change the Cache Key Template to:
Expand Down
4 changes: 4 additions & 0 deletions src/content/docs/cache/how-to/cache-rules/settings.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ Enterprise customers have these additional options for custom cache keys:
- In the **Cookie** section, you can include cookie names and their values, and check for the presence of another cookie.
- In the **Host** section, you can select **Use original host** and **Resolved host**. In the **User** section, you can select **Device type**, **Country**, and **Language**. Using **Resolved host** means the cache key will contain whatever hostname was used to resolve the origin IP which can be different depending on whether the [resolve override](/rules/origin-rules/features/#dns-record) feature is on or not.

:::note
When [URL normalization](/rules/normalization/) is enabled, we recommend also enabling [Normalize URLs to origin](/rules/normalization/manage/), especially if you are setting custom cache keys or using cache by device type, which also modifies the cache key. This helps ensure the URL in the cache key matches the URL sent to the origin, preventing cache poisoning and ensuring consistent behavior.
:::

<Details header="API information">

API configuration object name: `"cache_key"`.
Expand Down