-
Notifications
You must be signed in to change notification settings - Fork 10k
Description
Existing documentation URL(s)
- https://developers.cloudflare.com/workers/static-assets/compatibility-matrix/
- https://developers.cloudflare.com/pages/configuration/serving-pages/#caching-and-performance
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