强制CloudFront从S3传递最新的HTML文件
背景 我在S3上托pipe一个静态站点,CloudFront位于顶部。 我的问题是我的HTML文件。 根据CloudFront的FAQ : Amazon CloudFront使用这些caching控制标头来确定需要检查该文件的更新版本的来源的频率 我到目前为止所做的 考虑到这一点,我已经在我的S3桶中设置了HTML文件来添加下面的头文件: Cache-Control: no-cache, no-store, max-age=0, must-revalidate Expires: Fri, 01 Jan 1990 00:00:00 GMT 在我第一次调用我的samplefile.htm ,我看到以下响应标题(我已经排除了明显的标题(例如Content-Type )以保持这一点: Cache-Control:no-cache, no-store, max-age=0, must-revalidate Date:Sat, 10 Dec 2011 14:16:51 GMT ETag:"a5890ace30a3e84d9118196c161aeec2" Expires:Fri, 01 Jan 1990 00:00:00 GMT Last-Modified:Sat, 10 Dec 2011 14:16:43 GMT Server:AmazonS3 X-Cache:Miss from cloudfront 正如你所看到的,我的Cache-Control头在那里。 问题是,如果我更新这个文件并刷新,我得到caching的内容(而不是最新的文件),我可以看到CloudFront通过查看响应头来提供它的caching版本: X-Cache:Hit from […]