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
Cyb3r-Jak3
Cyb3r-Jak311mo ago
Workers always run in front of cache
pigri
pigri11mo ago
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.
pigri
pigri11mo ago
Here is the traffic sequence:
pigri
pigri11mo ago
workers is end of the sequence
Cyb3r-Jak3
Cyb3r-Jak311mo ago
Workers runs in front of cache.
James
James11mo ago
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.
pigri
pigri11mo ago
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.