Can I save some credits if I set the expiry date to never or 60 days on my CDN?

As you know, you can use your own CDN to serve the images that SPAI optimizes. You may also know that every 30 days, we flush the images from our CDN.

Therefore, a very normal question would be:  would it be a resource and cost saving measure if I set the expiry date to, for example, Never or 60 days on my CDN?

The short answer is no. We flush the images from the CDN every 30 days, that is correct. If you use your own CDN with an expiry date of 60 days, theoretically you should be able to keep the images for up to 60 days and do not use new ShortPixel credits. However, we also flush the images from our storage (the origin) every 30 days, so setting an expiry date of 60 days wouldn't work because a CDN has edges and usually an edge looks at the origin (which, like we said, we flush every 30 days too) for a requested asset. 

In short, after 30 days the stored file is removed anyway regardless of what CDN is used, so if an edge requests an image on the 31st day a new credit will be used.

We created the storage server mechanism so that an optimized image will be delivered right away for up to 30 days so that the edges will find the optimized image and the user won't be charged another credit.

In any case, there's a possible advantage on setting the expiry date to 60 days: it could help remove some warnings on Google PageSpeed Insights, GTmetrix and/or any other speed testers. Credits will be used every 30 days, but the testers will see a "better" expiry date.

Still need help? Contact Us Contact Us