It would be amazing to “self” set a
max-age=... on a worker response.
Any subsequent requests that satisfy cache settings would be served as a static resource by the Cloudflare Cache (globally) vs. having to request, run the worker again and rely only on edge cache.
A similar question has been “asked and answered” here: Avoid Worker request by cache
But I’m curious:
- Anything on the roadmap?
- Any hacks or tricks?
The only way I see this currently being resolved it to put a cache in front of the worker that you can manipulate (Cloudfront? Another Cloudflare account?), but it seems like overkill.
Speed / cost are the primary savings.