Skip to content

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Sep 1, 2025

  • A queue is only needed for time base revalidation
  • Add docs about CACHE_PURGE_API_TOKEN and CACHE_PURGE_ZONE_ID


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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think i know why there was a mention of On-demand, res.revalidate use the same binding that the one used by the queue. We only talk about it in the queue part of the docs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you suggest to update the the doc as:

-A queue must be setup for projects using Time-Based revalidation.
+A queue must be setup for projects using Time-Based revalidation or `res.revalidate` (Page Router)
It is not needed when revalidation is not used nor only On-Demand revalidation is used.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we could put it here, but it's not actually the queue that is needed it's only the binding itself.
Maybe we don't need the fix anymore actually, since now fetch are public if i'm not mistaken (We had to use the binding, but now it can just be a fetch, which i think is the default)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We had to use the binding, but now it can just be a fetch, which i think is the default

The binding will always be faster than a public fetch as it will skip part of the Cloudflare infra.
So we decided to keep using the binding for internal code to benefit for the improved perf.

I'll double check what we do currently.

@vicb vicb force-pushed the vicb/cache-tweaks branch from 8ef3f37 to 8dec01c Compare September 4, 2025 10:36
@vicb vicb merged commit c88206c into main Sep 4, 2025
1 check passed
@vicb vicb deleted the vicb/cache-tweaks branch September 4, 2025 10:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants