Caching R2 using worker cache api
Hello I was going through the docs and saw we can cache r2 resource through workers using the cache api.
I have tried to implement. It's working fine in local developement. I am getting CF-Cache-Status in local but when I am deploying I am not seeing any Cache Status header with the worker domain.
Here's the code
2 Replies
Are you using the workers.dev subdomain, or a real domain? Caching will generally only work with a real domain.
I am using worker.dev subdomain
Acutally through the worker.dev domain I am able to cache the api content that is hosted on nextjs. So I though I could achieve the same