cache worker request not working?

I deployed worker with github integration, attached to subdomain pointed to 192.168.0.2 then added cache rule to set Edge TTL for 3 hours and Browser TTL 30 minutes then I'm executing few times every minute or two - curl requests and 1) I don't see any cache headers 2) each execution takes 9 seconds cache rules do not apply to workers? on the other hand "Tracy" functionality for given url shows cache rules should be applied
2 Replies
zapalona_swieczka
on second thought - I have basic auth on that request, maybe that's the reason disabled basic auth and still not cached hm, in panel for worker settings in bindings I don't see KV ok I think moving kv_namespaces upwords helped, I think it was specifically above [version_metadata]
Marius B.
Marius B.2w ago
Hi! Cache rules are not really reliable. Cloudflare decides based on the amount of reqests a route gets, if they cache it or not. Sometimes it takes a while. The CF cache isn't distributed across colocations. That means if your site gets a lot requests from a specifig region, CF first caches your site there. Using KV is a good choice. It is more controllable than cache rules.
Want results from more Discord servers?
Add your server