Can one cache worker endpoints so worker _not called again_?

For Workers & Pages, what is the name of the domain?

What is the issue or error you’re encountering

I can’t cache a worker result so the worker is not called again

What steps have you taken to resolve the issue?

I tried adding a page rule to “cache everything”, but in the trace even though that rule is matched, it still carries on to the worker.

What I want is to be able to generate some content in the worker that’s cached. I know there’s programmatic access to the cache in the worker, but ideally I’d like to cache this much like it’s an origin server, so I don’t need to burn through the free tier API limits.

Is there a way to do this? I feel like it should be possible somehow as if the worker weren’t hosted by Cloudflare, couldn’t I just CNAME proxy it in Cloudflare DNS, and they’d respect the cache settings in the response?

I can’t edit my post, but just to make clear - I know within the worker itself I can store in the cache, and check it first.

But I want it to be more like the endpoint is just an origin server endpoint, so the worker isn’t even called, and I don’t burn through the 100k/day limit.

I’ve also tried adding a proxy of the worker in DNS. So there’s two entries:

Worker worker.mydomain.com → red-sky-1234 (i.e. the worker)
CNAME www → worker.mydomain.com

Now instead of no caching, I get a 522 timeout.