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

后端 未结 9 1081
死守一世寂寞
死守一世寂寞 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:55

    S3 is not used for real time development but if you really want to test your freshly deployed website use

    http://yourdomain.com/index.html?v=2
    http://yourdomain.com/init.js?v=2
    

    Adding a version parameter in the end will stop using the cached version of the file and the browser will get a fresh copy of the file from the server bucket

提交回复
热议问题