问题
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