Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Duplicate CF invalidations #286

Open
joruro opened this issue Dec 5, 2019 · 1 comment
Open

Duplicate CF invalidations #286

joruro opened this issue Dec 5, 2019 · 1 comment

Comments

@joruro
Copy link

joruro commented Dec 5, 2019

Every time that there is a new transformation, I'm getting duplicate CF invalidations.

Also, when the transformation is new, I don't get why is the plugin busting the cache if the filename is so unique that is hard to collide any existing file.

The number of invalidations tend to be auto of control and this is have an impact on the hosting costs

@aelvan
Copy link
Owner

aelvan commented Dec 6, 2019

Hi,

Can you describe how you tested to come to the conclusion that Imager duplicates CF invalidations?

If you're using post-optimization tools and running them as tasks, there will be duplicated invalidations, as the un-optimized image will be uploaded to S3, then the optimized one.

Imager has no way of knowing if a transform has previously existed on S3/Cloudfront or not, so invalidations will have to run whether or not the transform is "new".

But there might of course be scenarios I haven't thought of, or bugs, so let me know how you tested and steps to reproduce.

Also, feel free to disable invalidation by setting cloudfrontInvalidateEnabled to false in the AWS storage setting, or remove cloudfront altogether. Yes, using a distributed CDN has an impact on the hosting cost.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants