【问题标题】:When the file change in amazon s3, the file not change in amazon cloutfront当 amazon s3 中的文件更改时,amazon cloudfront 中的文件不会更改
【发布时间】:2014-10-14 10:43:50
【问题描述】:

我使用 amazon s3 进行图像存储。我可以上传任何文件,这非常好。但是当我在 s3 中删除或更新图像时,cloutfront 仍然保留旧图像。

如何更改 cloutfront 图像文件?

我使用 php 和 codeigniter。我用this library

【问题讨论】:

    标签: php codeigniter amazon-s3 amazon amazon-cloudfront


    【解决方案1】:

    是的,我找到了解决方案。

    如果我像这样 max-age=SECOND 更改文件 Cache-Control 值,则 cloutfront 每隔 SECOND 刷新此文件的缓存。

    详细信息:Amazon

    对于 php 用户,s3 库选项:Library

    【讨论】:

      【解决方案2】:

      将云端的 TTL 降低到可用的最低值。您的问题将得到解决。

      【讨论】:

      • 感谢您的回答。但它没有解决:/我改变 ttl 10 秒但仍然工作。
      猜你喜欢
      • 2021-03-09
      • 2011-02-06
      • 2021-03-09
      • 2018-04-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多