How to cache static assets?

How can I enable caching for static assets? By default files like .js, .css, .png responding with: cache-control: public, max-age=0, must-revalidate Tried to use these caching rules, but from what I reed and tested these wont work for workers static assets.
Cloudflare Docs
Cache Rules · Cloudflare Cache (CDN) docs
Use Cache Rules to customize cache settings on Cloudflare. Cache Rules allows you to make adjustments to what is eligible to cache, how long it should be cached and where, as well as trigger specific interactions with Cloudflare’s cache and other Rules products for matching requests.
2 Replies
Walshy
Walshy2w ago
Workers Assets already caches as part of the platform, Workers also run before cache
Nick
NickOP2w ago
Thank you for your reply. I disabled the cache using the developer toolbar, which changed the status from 304 to 200. Apparently, the files were handled correctly after all.

Did you find this page helpful?