How to cache R2 files?

I am using Cloudflare pages for my react front end. I use R2 for storing files. Currently I use R2 public bucket to store user profile images and use the links to show on my app. I want to now cache those files. how do I do it?
3 Replies
Soham
Soham2y ago
If you are using a custom domain then it already caches it for you
Tur!ng
Tur!ngOP2y ago
I dont use custom domain
Soham
Soham2y ago
You can only cache in R2 if you use a custom domain or you use a worker route

Did you find this page helpful?