payload icon indicating copy to clipboard operation
payload copied to clipboard

feat(storage-*): add support for browser-based caching via etags

Open paulpopus opened this issue 1 year ago • 3 comments

This PR makes changes to every storage adapter in order to add browser-based caching by returning etags, then checking for them into incoming requests and responding a status code of 304 so the data doesn't have to be returned again.

Performance improvements for cached subsequent requests: image

This respects disableCache in the dev tools.

Also fixes a bug with getting the latest image when using the Vercel Blob Storage adapter.

paulpopus avatar Dec 17 '24 02:12 paulpopus

Can you verify a file with spaces in the name uploaded before this change can still be retrieved?

denolfe avatar Dec 17 '24 12:12 denolfe

Can you verify a file with spaces in the name uploaded before this change can still be retrieved?

I don't think this change affects those. Paul simply just moved the code around. No packages were bumped either.

JarrodMFlesch avatar Dec 17 '24 19:12 JarrodMFlesch

I don't think this change affects those. Paul simply just moved the code around. No packages were bumped either.

Yeah the PR changed a bit since the initial changes

paulpopus avatar Dec 17 '24 21:12 paulpopus

🚀 This is included in version v3.9.0

github-actions[bot] avatar Dec 18 '24 21:12 github-actions[bot]