Skip to content

Commit 46b5063

Browse files
authored
Cloudflare Workers Cache is no longer private beta (withastro#14198)
1 parent 7c1bb2b commit 46b5063

1 file changed

Lines changed: 4 additions & 6 deletions

File tree

src/content/docs/en/guides/caching.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ If you deploy to Netlify, Vercel, or Cloudflare, you can use their respective ad
3838

3939
Astro's first-party adapters for Netlify, Vercel, and Cloudflare each provide an experimental CDN cache provider that maps cache directives to the platform's native cache headers and invalidation API. Rather than storing responses in memory, these push your caching directives to the host's edge network, and cache hits are served straight from the CDN without invoking your server function.
4040

41-
During the experimental phase these providers need to be manually enabled, as shown below. In a future release, the Netlify and Vercel providers will be enabled automatically by their adapters. The Cloudflare provider requires a feature that is currently in private beta.
41+
During the experimental phase these providers need to be manually enabled, as shown below. In a future release, they will be enabled automatically by their adapters.
4242

4343
Each provider automatically tags cached responses with the request path, so [`cache.invalidate({ path })`](/en/reference/api-reference/#cacheinvalidate) works on platforms that only support tag-based purges.
4444

@@ -97,10 +97,6 @@ The provider sets `Vercel-CDN-Cache-Control` and `Vercel-Cache-Tag` headers. Bot
9797
<Since pkg="@astrojs/cloudflare" v="14.0.0" />
9898
</p>
9999

100-
:::caution[Private beta]
101-
The Cloudflare provider requires the Cloudflare Workers Cache feature, which is currently in private beta. Without beta access, the headers are ignored and calling `cache.invalidate()` will throw an error.
102-
:::
103-
104100
Import `cacheCloudflare()` from `@astrojs/cloudflare/cache` and set it as your cache provider:
105101

106102
```js title="astro.config.mjs" ins={3, 7-9}
@@ -116,7 +112,9 @@ export default defineConfig({
116112
});
117113
```
118114

119-
The provider sets `Cloudflare-CDN-Cache-Control` and `Cache-Tag` headers. The adapter enables Worker caching automatically when a Cloudflare cache provider is configured. Both tag-based and path-based invalidation are supported.
115+
The provider sets `Cloudflare-CDN-Cache-Control` and `Cache-Tag` headers. Both tag-based and path-based invalidation are supported.
116+
117+
The adapter enables the Cloudflare [Workers Cache](https://developers.cloudflare.com/workers/cache/) with default settings when a Cloudflare cache provider is used. You can [change the configuration](https://developers.cloudflare.com/workers/cache/configuration/) if needed, for example if you want to preserve the cache when you deploy a new version of the site.
120118

121119
## Interacting with the cache
122120

0 commit comments

Comments
 (0)