Amazon S3 and Cloudfront cache, how to clear cache or synchronize their cache

后端 未结 9 998
死守一世寂寞
死守一世寂寞 2021-01-30 05:59

I have a cron job that runs every 10 minutes and updates the content-type and x-amz-meta. But since yesterday it seems like after the cron job run, Amazon is not picking up the

相关标签:
9条回答
  • 2021-01-30 06:59

    (edit: Does not work)As of 2014, You can clear your cache whenever you want, Please go thorough the Documentation or just go to your distribution settings>Behaviors>Edit

    Object Caching Use (Origin Cache Headers) Customize

    Minimum TTL = 0

    http://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Expiration.html

    0 讨论(0)
  • 2021-01-30 07:01

    Cloudfront will cache a file/object until the cache expiry. By default it is 24 hrs. If you have changed this to a large value, then it takes longer.

    If you anytime needs to force clear the cache, use the invalidation. It is charged separately.

    Another option is to change the URL (object key), so it fetches the new object always.

    0 讨论(0)
  • 2021-01-30 07:05

    Here is a manual way to invalidate the cache for all files on CloudFront via AWS

    0 讨论(0)
提交回复
热议问题