Title: AMP Cache Update
Last modified: January 19, 2021

---

# AMP Cache Update

 *  Resolved [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * (@flixwatchsupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/)
 * Hi,
 * Has the feature of updating the cache been added to the plugin? If not, is there
   any possibility of adding it in near term?

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Thread Starter [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * (@flixwatchsupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13925949)
 * I have already gone through this link – [https://developers.google.com/amp/cache/update-cache](https://developers.google.com/amp/cache/update-cache)
   but it’s a bit complicated for me to understand.
 *  [James Osborne](https://wordpress.org/support/users/jamesosborne/)
 * (@jamesosborne)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13926360)
 * Thanks for reaching out. This feature has not yet been implementation. You can
   find out more and subscribe to the below GitHub issue for further updates on 
   this:
    [https://github.com/ampproject/amp-wp/issues/598](https://github.com/ampproject/amp-wp/issues/598)
 * You may also find [this GitHub issue](https://github.com/ampproject/amp-wp/issues/5378)
   useful, with users able to opt out of AMP cache for their content. This is also
   awaiting further updates from AMP upstream.
 *  Thread Starter [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * (@flixwatchsupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930523)
 * How do you change the max-age as mentioned in [https://developers.google.com/amp/cache/update-cache](https://developers.google.com/amp/cache/update-cache)
 *  Thread Starter [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * (@flixwatchsupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930610)
 * Is there any way to test, if a URL is being served from AMP Cache or not?
 * For example, this is an AMP page – [https://www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/](https://www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/),
   I have validated it on AMP Test.
 * When I check it’s header, it can’t be identified if it’s being served from AMP
   Cache or not –
    {‘Date’: ‘Wed, 20 Jan 2021 03:20:36 GMT’, ‘Content-Type’: ‘text/
   html; charset=UTF-8’, ‘Transfer-Encoding’: ‘chunked’, ‘Connection’: ‘keep-alive’,‘
   Set-Cookie’: ‘__cfduid=d7e443a8d90cded562959a8767b6aab931611112836; expires=Fri,
   19-Feb-21 03:20:36 GMT; path=/; domain=.whats-on-netflix.com; HttpOnly; SameSite
   =Lax; Secure’, ‘Last-Modified’: ‘Tue, 19 Jan 2021 21:12:03 GMT’, ‘Cache-Control’:‘
   public, max-age=7776000’, ‘Expires’: ‘Tue, 20 Apr 2021 03:20:36 GMT’, ‘Vary’:‘
   Accept-Encoding,User-Agent,Accept-Encoding’, ‘CF-Cache-Status’: ‘DYNAMIC’, ‘cf-
   request-id’: ’07bf6804390000dca13096e000000001′, ‘Expect-CT’: ‘max-age=604800,
   report-uri=”[https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”&#8216](https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”&#8216);,‘
   Report-To’: ‘{“endpoints”:[{“url”:”https:\\/\\/a.nel.cloudflare.com\\/report?
   s=EBLDIer3oL87%2FzpNM0LSs0%2Fv7p3IdQLyxy%2Fn19V%2B1loHbRRpKrY33jbQPojeGf%2BVE84VzHXtbL%
   2FseQ3Y9YpX8X4j2qpljJQgz6mVTv%2BeO05BmgVP7xBLEFo%3D”}],”group”:”cf-nel”,”max_age”:
   604800}’, ‘NEL’: ‘{“report_to”:”cf-nel”,”max_age”:604800}’, ‘Strict-Transport-
   Security’: ‘max-age=0; preload’, ‘X-Content-Type-Options’: ‘nosniff’, ‘Server’:‘
   cloudflare’, ‘CF-RAY’: ‘6145a919fbd4dca1-MAA’, ‘Content-Encoding’: ‘gzip’}
 * This is a non-AMP page – [https://www.whats-on-netflix.com/whats-new/](https://www.whats-on-netflix.com/whats-new/)
   and the Header response is the same –
 * {‘Date’: ‘Wed, 20 Jan 2021 03:22:58 GMT’, ‘Content-Type’: ‘text/html; charset
   =UTF-8’, ‘Transfer-Encoding’: ‘chunked’, ‘Connection’: ‘keep-alive’, ‘Set-Cookie’:‘
   __cfduid=df0951d84755de428221422eb1ac491631611112978; expires=Fri, 19-Feb-21 
   03:22:58 GMT; path=/; domain=.whats-on-netflix.com; HttpOnly; SameSite=Lax; Secure’,‘
   Last-Modified’: ‘Tue, 19 Jan 2021 16:37:34 GMT’, ‘Cache-Control’: ‘public, max-
   age=7776000’, ‘Expires’: ‘Tue, 20 Apr 2021 03:22:58 GMT’, ‘Vary’: ‘Accept-Encoding,
   User-Agent,Accept-Encoding’, ‘CF-Cache-Status’: ‘DYNAMIC’, ‘cf-request-id’: ’
   07bf6a2fff0000df538da69000000001′, ‘Expect-CT’: ‘max-age=604800, report-uri=”
   [https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”&#8216](https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”&#8216);,‘
   Report-To’: ‘{“endpoints”:[{“url”:”https:\\/\\/a.nel.cloudflare.com\\/report?
   s=QKFl%2FTQTZvtieurNFr6Krrkc%2BJXUFNPUiMc7ikJQGvUUFgpj%2FQ6SBOXZSiksAcRCXmowGPDJyeLNBDEw%
   2F4eBOo2pnWYHoF0scayNWXHEHpU0xOi%2Bv1CB0So%3D”}],”group”:”cf-nel”,”max_age”:604800}’,‘
   NEL’: ‘{“max_age”:604800,”report_to”:”cf-nel”}’, ‘Strict-Transport-Security’:‘
   max-age=0; preload’, ‘X-Content-Type-Options’: ‘nosniff’, ‘Server’: ‘cloudflare’,‘
   CF-RAY’: ‘6145ac933f36df53-BOM’, ‘Content-Encoding’: ‘gzip’}
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930770)
 * If the URL is valid AMP, then it is eligible to be served from an AMP Cache.
 * Here is the URL to the Google AMP Cache: [https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/](https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/)
 *  Thread Starter [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * (@flixwatchsupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930783)
 * But it can’t be tested using the response header string? I mean the original 
   URL not ampproject one.
    -  This reply was modified 5 years, 4 months ago by [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/).
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930794)
 * As for setting the max-age, here is some PHP code you can use in a custom plugin:
 *     ```
       add_filter(
       	'wp_headers',
       	function ( $headers ) {
       		if ( ! isset( $headers['Cache-Control'] ) && ! is_user_logged_in() ) {
       			$headers['Cache-Control'] = 'public, max-age=604800';
       		}
       		return $headers;
       	}
       );
       ```
   
 * That would set the max-age to 1 week.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930797)
 * > But it can’t be tested using the response header string? I mean the original
   > URL not ampproject one.
 * I don’t understand.
 *  Thread Starter [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * (@flixwatchsupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930802)
 * I mean, can it be tested by using the [https://www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/](https://www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/)
   directly if its cached or not. Or do I have to check [https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/](https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/)
   the status 200/date here to see if it has been cached or not.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13930826)
 * If your AMP page has been indexed by Google Search, then you should assume it
   is cached by the Google AMP Cache.
 * > I mean, can it be tested by using the [https://www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/](https://www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/)
   > directly if its cached or not. Or do I have to check [https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/](https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/)
   > the status 200/date here to see if it has been cached or not.
 * You can’t check the AMP page on your own server if it is in an AMP Cache, no.
   There are multiple AMP Caches, including the Google one and the Bing one.
 * In fact, the AMP Cache works as a reverse proxy, so the moment that you access
   an AMP page via the cache, then it will at that point be added to the cache, 
   as far as I know.
 * So I can go to another URL on your site that has never before been seen by the
   AMP Cache, like [https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/?unique-never-before-seen-string](https://www-whats–on–netflix-com.cdn.ampproject.org/c/s/www.whats-on-netflix.com/news/harry-potter-movies-netflix-2020/amp/?unique-never-before-seen-string)
   and it will then be fetched and cache on demand.
 *  Thread Starter [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * (@flixwatchsupport)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13932130)
 * Got it. Thanks.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘AMP Cache Update’ is closed to new replies.

 * ![](https://ps.w.org/amp/assets/icon.svg?rev=2527602)
 * [AMP](https://wordpress.org/plugins/amp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/amp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/amp/)
 * [Active Topics](https://wordpress.org/support/plugin/amp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/amp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/amp/reviews/)

## Tags

 * [cache update](https://wordpress.org/support/topic-tag/cache-update/)

 * 11 replies
 * 3 participants
 * Last reply from: [FlixWatch Support](https://wordpress.org/support/users/flixwatchsupport/)
 * Last activity: [5 years, 4 months ago](https://wordpress.org/support/topic/amp-cache-update/#post-13932130)
 * Status: resolved