Google AMP Purge CDN, When the Source Updated

我是研究僧i 提交于 2019-12-07 21:47:09

问题


Can we do anything to update the AMP CDN to purge specific pages or entire domain cached HTML?


回答1:


You can update the contents of the cache on a URL by URL basis using the update ping mechanism: https://developers.google.com/amp/cache/update-ping

This involves making a GET request to the AMP cache URL for your content.




回答2:


I tied in the update-ping api call to our CMS when we publish or unpublish a story. So everytime we update or remove a page we call the update-ping API so we can update the page cache or remove the page cache depending on what the user has done. You cannot (as of now, could change in the future) cache or clear the entire cache of an entire domain. No wild cards allowed currently.

Hope this helps.



来源:https://stackoverflow.com/questions/35348972/google-amp-purge-cdn-when-the-source-updated

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!