AWS S3 里面文件更新了如何让 CloundFront 同步更新

Description

AWS S3 files have been updated, but CloundFront does not update immediately. As the CloundFront Guide, it will update the files every 24hours. How to set the update frequency by yourself? You should set the "Cache-Control" for HTML file.

How to change the Cache-Control max-age via the AWS S3 Console:

  • Navigate to the file whose Cache-Control you would like to change.
  • Check the box next to the file name (it will turn blue)
  • On the top right click Properties
  • Click Metadata
  • If you do not see a Key named Cache-Control, then click Add more metadata.
    Set the Key to Cache-Control set the Value to max-age=0 (where 0 is the number of seconds you would like the file to remain in the cache). You can replace 0 with whatever you
image

你可能感兴趣的:(AWS S3 里面文件更新了如何让 CloundFront 同步更新)