Possible to replicate worker cache to all edge locations?

Using the Cache API a cached version of a response will get cached at the edge location a user ends up hitting. I’m wondering if there is a way to replicate that cache to all edge locations when this happens?

Edit: I should add the fetch request is to a remote domain that’s not behind Cloudflare.

I’d like to find a way that if a user puts the response in the cache by hitting the SEA edge location, then another visitor doesn’t have to prime the cache again if hitting the NYC edge location.

Thanks

Cache API is per Edge location, but you could build something with Workers KV (limit of 2Mb per value stored) that is globally distributed. I have some workers that do that.

1 Like