gpt4 book ai didi

cdn - Windows Azure CDN 中的更新文件

转载 作者:行者123 更新时间:2023-12-04 12:34:50 28 4
gpt4 key购买 nike

我有 blob 存储和 CDN 端点,用于存储我的静态内容。
现在我想更新 app.js 文件,因为它被修改了,但是当我将此文件写入 blob 时,CDN 仍然给我旧的 app.js 文件。如何更新我的 app.js 文件?或者我必须等到我的缓存不会结束?

最佳答案

只是你不能在它到期之前更新缓存对象。

来自 https://msdn.microsoft.com/en-us/library/azure/gg680303.aspx :

If you no longer wish to cache an object in the Azure Content Delivery Network (CDN), you can take one of the following steps:

  • For a Azure blob, you can delete the blob from the public container.

  • You can make the container private instead of public. See Restrict Access to Containers and Blobs for more information.

  • You can disable or delete the CDN endpoint using the Azure Management Portal.

  • You can modify your hosted service to no longer respond to requests for the object.

An object already cached in the CDN will remain cached until the time-to-live period for the object expires. When the time-to-live period expires, the CDN will check to see whether the CDN endpoint is still valid and the object still anonymously accessible. If it is not, then the object will no longer be cached.

No explicit "purge" tool is currently available for the Azure CDN.



如果可能,其他解决方法包括使用假查询字符串或新文件名。看这里: https://stackoverflow.com/a/8773202/908336

关于cdn - Windows Azure CDN 中的更新文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12529221/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com