未应用Amazon S3图像缓存控制 [英] Amazon S3 images cache-control not being applied

查看:114
本文介绍了未应用Amazon S3图像缓存控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我进行了全面搜索,找到了一种在Amazon S3上缓存图像的方法。每当我上传图片时,都会添加 cache-control 的元元素,然后设置 max-age = 86400 。但是,在任何速度测试站点上,都说我的图像没有应用缓存

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.

我不确定是否重要,但是我已将CloudFront链接到此S3存储桶。抱歉,对AWS而言是全新的。

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?

推荐答案


在任何类型的速度测试站点上都说我的图像没有应用缓存

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

这不是这个意思。屏幕截图显示他们的新鲜度寿命短,建议超过1周。

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

您的设置为 max -age = 86400 仅24小时。

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

这篇关于未应用Amazon S3图像缓存控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆