caching - How to purge CDN cache programmatically for an item?
问题描述
After integration of azure CDN in our site, we found that the cache is not purged while replacing the file. This is happening only for PDF file type. We want to purge the cache on replace of the file. Please help us if anyone has faced the similar issue and purged the CDN cache programmatically.
Thanks
解决方案
雷,
您可以使用以下 Rest API 文档从 Azure CDN 中清除内容: https ://docs.microsoft.com/en-us/rest/api/cdn/cdn/endpoints/purgecontent
在请求正文中,在 contentPaths 参数下,您可以提供要清除的内容的路径。它可以描述文件路径或通配符目录。
谢谢!
推荐阅读
- java - 使用JNA将布尔值从Java传递到Android中的本机C
- visual-studio-code - 片段:嵌套占位符不起作用
- javascript - 如何通过 CSS 下载过滤后的图像?
- javascript - 如何在 Firefox 上设置 JavaScript 中事件处理的性能(例如 onmousemove)?
- javascript - JS浮点导致不正确的舍入 - Math.round() 总是有效?
- postman - 如何根据发送的值在 Postman 中设置环境变量是请求正文?
- python - 使用 lambda 根据其他行替换每个单元格中的值并应用 i python
- android - 如何在 onTouch() 中等待 n 毫秒?
- python - ValueError:无法将字符串转换为浮点数:(在python中)
- laravel-valet - Laravel Livewire - 502 错误网关