Skip to content
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

Clarify caching difference between Cloudflare Workers with Static Assets and Cloudflare Pages advanced mode #20445

Open
rmarscher opened this issue Mar 1, 2025 · 0 comments
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:pages product:workers Related to Workers product

Comments

@rmarscher
Copy link

Existing documentation URL(s)

What changes are you suggesting?

I have found a difference betwee Cloudflare Workers with Static Assets and Cloudflare Pages advanced mode function that I think is not well documented. Cloudflare Pages advanced mode functions run AFTER the Cache Rules while Cloudflare Workers run BEFORE the Cache Rules.

The docs for Cloudflare Pages allude to this - https://developers.cloudflare.com/pages/configuration/serving-pages/#caching-and-performance

Just make sure that your caching does not interfere with any redirects or Functions.

With Cloudflare Pages advanced mode functions, I can do SWR with Cache Rules.

With Cloudflare Workers, this is not possible. My worker always executes.

It would be nice if this was more clearly documented. It would be really nice if there was an option for Cloudflare Workers to execute after Cache Rules. Then you could deprecate advanced mode for Cloudflare Pages and direct everyone to Cloudflare Workers with Static Assets.

Thank you.

Additional information

No response

@rmarscher rmarscher added content:edit Request for content edits documentation Documentation edits labels Mar 1, 2025
@github-actions github-actions bot added product:pages product:workers Related to Workers product labels Mar 1, 2025
@rmarscher rmarscher changed the title Clarify difference between Cloudflare Workers with Static Assets and Cloudflare Pages advanced mode Clarify cachint difference between Cloudflare Workers with Static Assets and Cloudflare Pages advanced mode Mar 2, 2025
@rmarscher rmarscher changed the title Clarify cachint difference between Cloudflare Workers with Static Assets and Cloudflare Pages advanced mode Clarify caching difference between Cloudflare Workers with Static Assets and Cloudflare Pages advanced mode Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:pages product:workers Related to Workers product
Projects
None yet
Development

No branches or pull requests

6 participants