From d053e1d07a65b346019889ff6ea61e25cf75dc1e Mon Sep 17 00:00:00 2001 From: angelampcosta <92738954+angelampcosta@users.noreply.github.com> Date: Thu, 9 Jan 2025 11:16:04 +0000 Subject: [PATCH] [Cache] Adds clarification for cache rules fields and purge (#19096) * Adds clarification for cache rules fields and purge * Apply suggestions from code review Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> --------- Co-authored-by: Pedro Sousa <680496+pedrosousa@users.noreply.github.com> --- .../cache/how-to/cache-rules/settings.mdx | 36 ++++++++++--------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/src/content/docs/cache/how-to/cache-rules/settings.mdx b/src/content/docs/cache/how-to/cache-rules/settings.mdx index 07effd41bb0645..1fd1190fe59e5c 100644 --- a/src/content/docs/cache/how-to/cache-rules/settings.mdx +++ b/src/content/docs/cache/how-to/cache-rules/settings.mdx @@ -15,26 +15,28 @@ These are the settings that you can configure when creating a cache rule. ## Fields -The fields available for Cache Rule matching expressions in the Expression Builder are: - -* Cookie - `http.cookie` -* Hostname - `http.host` -* Referer - `http.referer` -* SSL/HTTPS - `ssl` -* URI Full - `http.request.full_uri` -* URI - `http.request.uri` -* URI Path - `http.request.uri.path` -* URI Query String - `http.request.uri.query` -* User Agent - `http.user_agent` -* X-Forwarded-For - `http.x_forwarded_for` -* Request Headers - `http.request.headers` -* Cookie value of - `http.request.cookies` - -For a list of all available fields refer to [Fields](/ruleset-engine/rules-language/fields/). +The fields available for Cache Rule matching expressions in the **Expression Builder** are: + +- URI Full - `http.request.full_uri` +- URI - `http.request.uri` +- URI Path - `http.request.uri.path` +- URI Query String - `http.request.uri.query` +- Cookie - `http.cookie` +- Hostname - `http.host` +- Referer - `http.referer` +- SSL/HTTPS - `ssl` +- User Agent - `http.user_agent` +- X-Forwarded-For - `http.x_forwarded_for` +- Request Headers - `http.request.headers` +- Cookie value of - `http.request.cookies` +- File extension - `http.request.uri.path.extension` + +If you select the [**Edit expression**](/ruleset-engine/rules-language/expressions/edit-expressions/#expression-editor) option, you can enter any of the [available fields](/ruleset-engine/rules-language/fields/). :::note -Not all fields are available as a trigger for Cache Rules due to incompatibility with [Purge](/cache/how-to/purge-cache/). +The fields mentioned above support all types of purge. However, the [remaining available fields](/ruleset-engine/rules-language/fields/) support purge by tags, prefix (URL), hostname, and everything but are not compatible with [single file purge](/cache/how-to/purge-cache/purge-by-single-file/). + ::: ## Operators