Cache HTML served from worker

If I use the “send raw html” example from https://developers.cloudflare.com/workers how would I tell it to cache the content via the classic CDN?

Why would you want to use classic CDN for HTML that’s already stored at the edge? That’s faster than classic CDN.

If its on the CDN then the request won’t count against my quota on the worker if there is a “HIT”, unless I am mistaken?

Good point. That worker is still going to be called, as it’s a match. Workers sit in front of the cache. I use Workers as a smart Cache Everything for my WordPress sites. The Worker does some internal processing that behaves like a “Bypass Cache on Cookie” for cached HTML.

1 Like