Pretty sure i know the answer but cant find definitive yes/no.
Is there a way e.g. api call to make a page stored in google's amp cache to force it to get new copy of that page?
Editorial want to know when they update a page in cms that google gets updates too.
Yes, you can easily force the Google AMP Cache to update your AMP page:
The most effective way to update the version of any AMP document stored in the Google AMP Cache is to access that document using the AMP Cache URL format. The Google AMP Cache automatically requests the latest version of the AMP document from its origin and serves the updated version to the next user.
For example, to refresh http://example.com/amp_document.html, simply navigate to https://cdn.ampproject.org/c/example.com/amp_document.html.
There is an API called update-ping which is used for this very purposes. When a page on our site is published, republished or unpublished we call this API passing the page info it needs. At this point we are either adding the page to cache, updating the page in cache or removing the page entirely from the Google AMP cache. Things to note with this is there are no wildcards. This is done on a page by page basis. I just hooked the update-ping API call into our CMS publishing functionality. Now when publishing of any sorts happens we add, update or remove the cached url. This insures that the cache always represents the latest changes even if that means the page is going away. Bye bye cache.
Hope this helps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With