Cache and versioning on auto mapping
Hello,
Currently I am using cloudinary's solution to auto-map a S3 bucket fulfilled with images.
The issue I am facing right now is that when I overwrite an image on S3 I cannot see it though cloudinary (and it's visible on the bucket/cdn URL).
I've done some research on image versioning and Cache-Control for S3 and I could not come up with the best solution to solve this.
What should be done? On my cloudinary library the image appears outdated (saying that it was uploaded months ago), like it is not being refreshed.
I could not figure out a way to implement versioning with auto-upload. Should I use upload presets? Is there a way to invalidate the cache automatically on image overwrite?
I've already set some resources to send the Cache-Control header on S3 but it does not work, using custom parameters on the URL does not work as well, adding /v11245141/ on the URL does not have any effect. That seems odd, right? Since if it is a caching problem a different URL should have return a fresh version of the image from s3 bucket.
Thanks!
-
Hi Gabriel,
Upload mapping works in such way that only image which don't exist on Cloudinary are fetched from the remote location, therefore updating an image on your S3 bucket doesn't reflect on the Cloudinary account.
To solve this you can either initiate an additional upload request to Cloudinary and overwrite the existing image, or you can issue a destroy request to allow it to refetch next time it's accessed.
Let us know if this helps.
0
Post is closed for comments.
Comments
1 comment