You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a user has already called for a given version of an image, say 300x300, CloudFront will cache it and serve it to all users requesting the same variant. This is, of course, the desired behaviour.
However, if an admin updates the image in S3 (with or without versioning on the bucket) then of course the image in the CDN is now "invalid".
Does the solution provide a way in the base64 object or via the queryString to invalidate the cache and ensure that new versions of the image are created when requested?
This does appear challenging to implement for a number reasons:
We do not want to make a call to S3 on every request
We do not want users to commonly be able to bypass the cache as this defeats one goal of the solution
The solution would somehow have to track the relationship between cached variants and the original
Our solution to this is to hold an assetId in our product catalog that is independant of the productId and thus if a new image is uploaded then a new object is loaded to S3 and all is well.
The text was updated successfully, but these errors were encountered:
@GraemeBryce-Holibob please take a look at #285, it has explanation of how the caching currently works in the solution and how you can make changes to it i.e through cache policy on CloudFront and through cache-control headers on objects in S3.
What is your question?
I would like to know if I am missing something.
If a user has already called for a given version of an image, say 300x300, CloudFront will cache it and serve it to all users requesting the same variant. This is, of course, the desired behaviour.
However, if an admin updates the image in S3 (with or without versioning on the bucket) then of course the image in the CDN is now "invalid".
Does the solution provide a way in the base64 object or via the queryString to invalidate the cache and ensure that new versions of the image are created when requested?
This does appear challenging to implement for a number reasons:
Our solution to this is to hold an assetId in our product catalog that is independant of the productId and thus if a new image is uploaded then a new object is loaded to S3 and all is well.
The text was updated successfully, but these errors were encountered: