diff --git a/pages/cloudflare/caching.mdx b/pages/cloudflare/caching.mdx index 81f8883..6d1ab8b 100644 --- a/pages/cloudflare/caching.mdx +++ b/pages/cloudflare/caching.mdx @@ -425,7 +425,8 @@ export default defineCloudflareConfig({ #### Queue -A queue must be setup for projects using revalidation (either Time based or On-demand). +A queue must be setup for projects using Time-Based revalidation. +It is not needed when revalidation is not used nor only On-Demand revalidation is used. **Configure the queue** @@ -719,6 +720,11 @@ This component can either call the Cache API's purge function directly or route Cache purge are only called when you call `revalidateTag`, `revalidatePath` or `res.revalidate` in the pages router. It is not called for ISR revalidation. +To use cache purge, you need to define the following wrangler secrets: + +- `CACHE_PURGE_API_TOKEN` should be set to [an API token](https://developers.cloudflare.com/fundamentals/api/get-started/create-token/) with the `Cache Purge` permission +- `CACHE_PURGE_ZONE_ID` should be set to the [zone ID of your deployment domain](https://developers.cloudflare.com/fundamentals/account/find-account-and-zone-ids/) + Below is an example configuration for integrating the cache purge component in your `open-next.config.ts`: ```ts