Then no. Caching isn't available on the

Then no. Caching isn't available on the S3 API
3 Replies
jason
jason4mo ago
Wait, S3 signed URLs to view an object from R2 can't be cached by Cloudflare CDN? Thought you could set a responseCacheControl header for the GetObjectCommand() command (I'm new to R2, so you might be right.)
meowzillia
meowzilliaOP4mo ago
Correct, it cannot take advantage of the caching. IIRC from when R2 was in early stages, they do cache the auth layer for a bit but in general the ttfb and perf is around the same as regular R2 worker bindings
meowzillia
meowzilliaOP4mo ago
Depending on your infra there are many ways you can probably skip using s3 all together and creating your own little authenticated worker like i've done here. But it ultimately comes down to how you want to do it (image here is images that can utilize cache api, with one time use tokens, and ability to be cached via browser and cloudflare servers)
No description
Want results from more Discord servers?
Add your server