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

后端 未结 9 1016
死守一世寂寞
死守一世寂寞 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 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.

提交回复
热议问题