Skip to content

Commit 7b06c57

Browse files
committed
docs(cache): expand dashboard steps, fix headings, align UI labels, remove em dashes
1 parent 8de2e34 commit 7b06c57

5 files changed

Lines changed: 25 additions & 11 deletions

File tree

src/content/docs/cache/how-to/cache-response-rules/create-api.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ These examples demonstrate all the available actions in Cache Response Rules usi
184184

185185
</Details>
186186

187-
<Details header="Example: Multiple rules strip headers, tag responses, and set cache control">
187+
<Details header="Example: Multiple rules with strip headers, tag responses, and set cache control">
188188

189189
<APIRequest
190190
path="/zones/{zone_id}/rulesets/phases/http_response_cache_settings/entrypoint"

src/content/docs/cache/how-to/cache-response-rules/create-dashboard.mdx

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,20 @@ import { Render, DashButton } from "~/components";
2626
:::
2727

2828
7. Following the selection of the field and operator, enter the corresponding value that will trigger the Cache Response Rule. For example, if the selected field is `Hostname` and the operator is `equals`, a value of `example.com` would mean the rule matches any request to that hostname.
29-
8. Under **Then**, select the action you want to apply. Refer to [Available settings](/cache/how-to/cache-response-rules/settings/#available-actions) for the list of available actions and their parameters.
29+
8. Under **Then**, select one of the following actions:
30+
31+
- **Modify cache-control directives**: Set or remove `Cache-Control` directives sent by your origin. For each directive, choose **Set directive** or **Remove directive**. For duration-based directives like `max-age` or `s-maxage`, enter a value in seconds. Turn on **Cloudflare only** to apply the directive only within Cloudflare's cache without changing what visitors receive. Refer to [Supported directives](/cache/how-to/cache-response-rules/settings/#supported-directives) for the full list.
32+
33+
- **Modify cache tags**: Add, override, or remove cache tags on the response for targeted [purging](/cache/how-to/purge-cache/purge-by-tags/). Select one of the following operations:
34+
- **Add to existing tags**: Append new tags to the current set.
35+
- **Override existing tags**: Replace all current tags with the specified tags.
36+
- **Remove from existing tags**: Remove specific tags from the current set.
37+
38+
For the tag source, you can either specify tags manually or select **Parse from response header** to extract tags from a response header value. When parsing from a header, you can split the header value using a custom separator (for example, commas instead of spaces).
39+
40+
- **Strip headers**: Remove `Set-Cookie`, `ETag`, or `Last-Modified` headers from the origin response before Cloudflare evaluates the response for caching. Select which headers to strip.
41+
42+
For more details on each action, refer to [Available settings](/cache/how-to/cache-response-rules/settings/#available-actions).
3043
9. Under **Place at**, from the dropdown, you can select the order of your rule. From the main page, you can also change the order of the rules you have created.
3144
10. To save and deploy your rule, select **Deploy**. If you are not ready to deploy your rule, select **Save as Draft**.
3245

src/content/docs/cache/how-to/cache-response-rules/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ Cache Response Rules allow you to configure cache settings based on request and
1111

1212
With Cache Response Rules you can:
1313

14-
- Strip specific headers (ETags, Set-Cookie, Last-Modified) from origin responses before caching.
15-
- Add, remove, or set cache tags on responses for targeted [cache purging](/cache/how-to/purge-cache/).
16-
- Modify Cache-Control header directives in the origin response.
14+
- Modify `Cache-Control` directives sent by your origin.
15+
- Modify cache tags on responses for targeted [cache purging](/cache/how-to/purge-cache/).
16+
- Strip headers (`ETag`, `Set-Cookie`, `Last-Modified`) from origin responses before caching.
1717

1818
Cache Response Rules apply to both cached and non-cached (dynamic) responses from the origin. For example, you can strip Set-Cookie headers from responses that are not eligible for caching.
1919

src/content/docs/cache/how-to/cache-response-rules/settings.mdx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ The following functions are available in this phase:
6969
- starts_with
7070
- substring
7171
- to_string
72+
- upper
7273
- url_decode
7374
- wildcard_replace
7475

@@ -162,7 +163,7 @@ Refer to [Create a rule via API](/cache/how-to/cache-response-rules/create-api/)
162163

163164
Modifies Cache-Control header directives in the origin response.
164165

165-
### Supported directives
166+
#### Supported directives
166167

167168
**Directives with duration value (seconds):**
168169

@@ -186,11 +187,11 @@ Modifies Cache-Control header directives in the origin response.
186187
- `public`
187188
- `immutable`
188189

189-
### Directive configuration
190+
#### Directive configuration
190191

191192
The available parameters depend on the directive type.
192193

193-
#### Directives with duration value
194+
##### Directives with duration value
194195

195196
Applies to `max-age`, `s-maxage`, `stale-if-error`, and `stale-while-revalidate`.
196197

@@ -200,7 +201,7 @@ Applies to `max-age`, `s-maxage`, `stale-if-error`, and `stale-while-revalidate`
200201
| `cloudflare_only` | Boolean | When enabled, this setting only affects how Cloudflare caches your content. Your visitors still receive the original directive. |
201202
| `value` | Integer | Duration in seconds. **Required when operation is `set`.** |
202203

203-
#### Directives with optional qualifiers
204+
##### Directives with optional qualifiers
204205

205206
Applies to `private` and `no-cache`.
206207

@@ -210,7 +211,7 @@ Applies to `private` and `no-cache`.
210211
| `cloudflare_only` | Boolean | When enabled, this setting only affects how Cloudflare caches your content. Your visitors still receive the original directive. |
211212
| `qualifiers` | Array | Optional list of header names to qualify the directive. |
212213

213-
#### Boolean directives
214+
##### Boolean directives
214215

215216
Applies to `no-store`, `no-transform`, `must-revalidate`, `proxy-revalidate`, `must-understand`, `public`, and `immutable`.
216217

src/content/docs/cache/how-to/cache-response-rules/terraform-example.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar:
55
order: 5
66
head:
77
- tag: title
8-
content: Cache Response Rules Terraform example
8+
content: Cache Response Rules Terraform example
99
---
1010

1111
import { Details, Render } from "~/components";

0 commit comments

Comments
 (0)