Caching example

https://developers.cloudflare.com/workers/examples/cache-post-request/

In this example, a POST request is cached. However, when there's a cache miss, we have the line response = await fetch(request) but isn't that just going to hit the worker again?

I am trying to achieve something similar, but am looking for a way to encode the 'forwarding' url in my request, and wondering what the best way to do it is - query params, pathname, in the body or custom headers or something else?
Cloudflare Docs
Documentation for Cloudflare Workers, a serverless execution environment that allows you to create entirely new applications or augment existing ones
Was this page helpful?