Can Worker responses be cached automatically based on headers?

I just moved from Vercel to Cloudflare Pages/Workers. I have headers set for cache-control on those responses, but they get marked with a header cf-cache-status: DYNAMIC still. I have this header set Cache-Control: s-maxage=60, stale-while-revalidate=600 How do I achieve that?
2 Replies
Walshy
Walshy3mo ago
You can't cache in front of Workers But Workers Assets and Pages assets are already automatically cached (even if the status header says otherwise)
Wes
WesOP3mo ago
I added a cache rule under caching and it seemed to work, I now get HIT on the requests

Did you find this page helpful?