© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
Cloudflare DevelopersCD
Cloudflare Developers•14mo ago•
9 replies
cosbgn

How to cache workers with static assets (beta)?

I used to have my app deployed with
pages
pages
I moved to the
worker + assets beta
worker + assets beta
so I can have access to logs.
Unfortunately now my cache hit rate is zero.

In my backend I do:

setResponseHeader(event, "Cache-Control", "max-age=60, stale-while-revalidate=60")

return response
setResponseHeader(event, "Cache-Control", "max-age=60, stale-while-revalidate=60")

return response


This used to work perfectly with pages, but is not working anymore with workers+static assets
2024-12-07_14.png
Cloudflare Developers banner
Cloudflare DevelopersJoin
Welcome to the official Cloudflare Developers server. Here you can ask for help and stay updated with the latest news
85,042Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

How to cache static assets?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
14mo ago
How to update Workers Static Assets?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
12mo ago
Workers with static assets - asset caching?
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
14mo ago
Cache handling for static assets
Cloudflare DevelopersCDCloudflare Developers / workers-and-pages-help
11mo ago