Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The diagram below illustrates a common interaction flow between Workers and Cach

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.
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.
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.

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,4 @@ Cache API within Workers does not support tiered caching. Tiered Cache concentra
## Related resources

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