Skip to content

Commit 5cc7000

Browse files
[Cache] Documents interaction of cache rules with workers fetch (#20979)
* Documents interaction of cache rules with workers fetch * Update src/content/docs/cache/interaction-cloudflare-products/workers.mdx Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com> * Update src/content/docs/cache/interaction-cloudflare-products/workers.mdx --------- Co-authored-by: hyperlint-ai[bot] <154288675+hyperlint-ai[bot]@users.noreply.github.com>
1 parent 7373efe commit 5cc7000

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/content/docs/cache/interaction-cloudflare-products/workers.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ The diagram below illustrates a common interaction flow between Workers and Cach
1717

1818
1. A User (a) Requests a URI, and this request is directed to a Worker. The Worker can then interact with the request, either requesting the content further upstream using (b) fetch() or sending a (f) Response back to the User.
1919
2. If the content is cached, the Cache will send a (e) Response back to the Worker which can now interact with the response before sending a (f) Response back to the user.
20+
3. When using cache rules with Workers, the cache rule should not be set based on the user URL/host (a). Instead, the rule must match the properties of the URL in the fetch() (b) request — such as headers, hostname, or URL path — otherwise, the rule will not be applied.
2021

2122
Here are a few examples of how Workers can be used to customize cache behavior:
2223

src/content/docs/workers/reference/how-the-cache-works.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,4 @@ Cache API within Workers does not support tiered caching. Tiered Cache concentra
119119
## Related resources
120120

121121
- [Cache API](/workers/runtime-apis/cache/)
122+
- [Customize cache behavior with Workers](/cache/interaction-cloudflare-products/workers/)

0 commit comments

Comments
 (0)