Skip to content

Commit c88206c

Browse files
authored
docs(cloudflare): minor updates to the caching doc (#180)
1 parent c1c83d0 commit c88206c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

pages/cloudflare/caching.mdx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,8 @@ export default defineCloudflareConfig({
425425

426426
#### Queue
427427

428-
A queue must be setup for projects using revalidation (either Time based or On-demand).
428+
A queue must be setup for projects using Time-Based revalidation.
429+
It is not needed when revalidation is not used nor only On-Demand revalidation is used.
429430

430431
**Configure the queue**
431432

@@ -719,6 +720,11 @@ This component can either call the Cache API's purge function directly or route
719720

720721
Cache purge are only called when you call `revalidateTag`, `revalidatePath` or `res.revalidate` in the pages router. It is not called for ISR revalidation.
721722

723+
To use cache purge, you need to define the following wrangler secrets:
724+
725+
- `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
726+
- `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/)
727+
722728
Below is an example configuration for integrating the cache purge component in your `open-next.config.ts`:
723729

724730
```ts

0 commit comments

Comments
 (0)