PageRules does not work with workers? Caching issue.
Is it Somebody who has also had a problem with this?
I read this document, so I think possible work. I attached a picture from my config. https://developers.cloudflare.com/workers/configuration/workers-with-page-rules/#:~:text=When%20using%20Page%20Rules%20with,be%20set%20by%20Page%20Rules.
Page Rules · Cloudflare Workers docs
Page Rules trigger certain actions whenever a request matches one of the URL patterns you define. You can define a page rule to trigger one or more …
7 Replies
Workers always run in front of cache
I think that's not true the linked documentation is said something else some rules is not working, but not all of them. If you are using custom domain that's true.
Here is the traffic sequence:
workers is end of the sequence
Workers runs in front of cache.
The rules might be ‘evaluated’ before the worker runs, but that’s not the actual cache as jake said. If you want to do any caching within workers, you’ll need to use the cache APIs: https://developers.cloudflare.com/workers/runtime-apis/cache/
Cache · Cloudflare Workers docs
The Cache API allows fine grained control of reading and writing from the Cloudflare global network cache.
The documentation not crystal clear in this subject cache API already implemented. But I want to save some requests here, but I have another solution thanks.