Amazon S3 images cache-control not being applied

故事扮演 提交于 2020-01-07 06:17:56

问题


I searched all over and found a method to cache images on Amazon S3. Whenever I upload an image, I add a meta element of cache-control and then set max-age=86400. However, on any sort of speed test site it says that my images do not have a cache applied to them.

I am not sure if it matters, but I have CloudFront linked to this S3 bucket. Sorry, but completely new to AWS.

Anyone know why my images may not be caching?


回答1:


on any sort of speed test site it says that my images do not have a cache applied to them.

That isn't what this says. The screenshot says they have a short freshness lifetime, and longer than 1 week is recommended.

Your setting of max-age=86400 is only 24 hours.



来源:https://stackoverflow.com/questions/43860173/amazon-s3-images-cache-control-not-being-applied

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!