Amazon S3 images cache-control not being applied

2019-09-12 04:49发布

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?

enter image description here

enter image description hereenter image description here

1条回答
我欲成王,谁敢阻挡
2楼-- · 2019-09-12 05:50

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.

查看更多
登录 后发表回答