Limiting Cache Reserve

I have two Cloudflare Workers on the same domain name and would like to use Cache Reserve for responses from one of them but not the other.

What is the easiest way to prevent a workers responses from being cached to R2?

Have you reviewed this community article?

Bypass Cache Worker - Website, Application, Performance / Getting Started - Cloudflare Community

You can control caching behavior with the above.

Yes I reviewed the documentation and it doesn’t speak about the interaction with Cache Reserve anywhere that I can find. I would like to still make use of the standard Cloudflare caching but have certain requests opt out of Cache Reserve.

Thanks for clarifying further. I am unaware of a way to control cache reserve beyond enabling or disabling the feature within the dashboard for a whole domain.

I suggest checking in our developer’s discord as the discord is a great place to discuss workers related questions.


May I also ask the use case here? What are you trying to achieve by limiting cache reserve?

So far they haven’t been able to give me any answers.

I have some images that I could cache for 1 year, and other JSON data that is out of date after 10-15 minutes. Storing the JSON for 1 months is wasteful and I’d rather not store it in R2 at all.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.