How to cache workers with static assets (beta)?
I used to have my app deployed with
pages
I moved to the worker + assets beta
so I can have access to logs.
Unfortunately now my cache hit rate is zero.
In my backend I do:
This used to work perfectly with pages, but is not working anymore with workers+static assets6 Replies
Are these for static or dynamic assets?
For static assets, we recommend never caching them, as Pages/Assets does its own caching, which may break if you manually cache
your max-age is also a minute
that'll pretty consistently not be in cache
it's dynamic (i.e. a backend function/worker)
It's supposed to be a minute, but now it's just never cached
on pages it was working perfectly, it changed since I moved to workers + assets
Response header is correctly set to:
cache-control
max-age=60, stale-while-revalidate=60