-
Notifications
You must be signed in to change notification settings - Fork 10k
[Workers] Expliclity call out Cache Reserve incompatibility - WIP - DO NOT MERGE #17017
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
markdembo
commented
Sep 23, 2024
- Explicitly state that Cache Reserve is not supported in Workers docs
Deploying cloudflare-docs with
|
| Latest commit: |
145e28e
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://61ea8c76.cloudflare-docs-7ou.pages.dev |
| Branch Preview URL: | https://mdembo-workerscachereserve.cloudflare-docs-7ou.pages.dev |
| :::caution[Tiered caching and the Cache API] | ||
|
|
||
| Cache API within Workers does not support tiered caching. Tiered Cache concentrates connections to origin servers so they come from a small number of data centers rather than the full set of network locations. Cache API is local to a data center, this means that `cache.match` does a lookup, `cache.put` stores a response, and `cache.delete` removes a stored response only in the cache of the data center that the Worker handling the request is in. Because these methods apply only to local cache, they will not work with tiered cache. | ||
| Cache API within Workers does not support tiered caching or use with Cache Reserve. Tiered Cache concentrates connections to origin servers so they come from a small number of data centers rather than the full set of network locations. Cache API is local to a data center, this means that `cache.match` does a lookup, `cache.put` stores a response, and `cache.delete` removes a stored response only in the cache of the data center that the Worker handling the request is in. Because these methods apply only to local cache, they will not work with tiered cache. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should tell people to use KV
|
|
||
| ## Using Cache API | ||
|
|
||
| The Cache API allows for a simple API to cache POST requests. However, Cache API does not [support the use of Tiered Caching or Reserve Reserve](/workers/reference/how-the-cache-works/#cache-api). To increase Cache Hit Rates and offload origin load, consider using Workers KV instead (see below). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The Cache API allows for a simple API to cache POST requests. However, Cache API does not [support the use of Tiered Caching or Reserve Reserve](/workers/reference/how-the-cache-works/#cache-api). To increase Cache Hit Rates and offload origin load, consider using Workers KV instead (see below). | |
| The Cache API allows for a simple API to cache POST requests. However, Cache API does not support the use of [Tiered Caching or Reserve Reserve](/workers/reference/how-the-cache-works/#cache-api). To increase Cache Hit Rates and offload origin load, consider using Workers KV instead (see below). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggested which part of the text was included as the link to prevent potential confusion.
|
|
||
| ## Using Workers KV | ||
|
|
||
| KV allows |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know this PR is still a WIP so may get addressed later but this reads as incomplete for now.
|
Closing this out b/c there's conflicts + hasn't been touched for quite a while. feel free to re-open / bug me if this is in error. |