• Resolved jamesja

    (@jamesja)


    Hello, W3 is working perfectly with my regular site. Meaning when a post is updated that post cache is cleared and fresh version is available to guests right away. When a post is published, that category page cache is cleared right away and guests are able to see newly published post under related category page(s) right away.

    However, same function doesn’t happen with my AMP pages. What changes do I need to make so that AMP version pages cache is also cleared?

    Note: Cache is from my site, not google. As I check direct amp links.

    Note: I am using my theme’s AMP plugin. Links structure is having “amp/” at the end example amp pages links are “post-link/amp/” “category-link/amp/”.

    Regards,

    • This topic was modified 5 years, 5 months ago by jamesja.
Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesja,

    I am sorry about the issue you are having with clearing the AMP pages cache once a new post is published and I am happy to assist you with this.
    In Perfromance>Extensions you can enable AMP extension which adds compatibility for accelerated mobile pages (AMP).
    Please enable the extension and see if this solves your problem.
    Please let us know if this helps and please let us know if there is anything else we can assist you with.

    Thread Starter jamesja

    (@jamesja)

    Thank you for reply. I tried that, but it doesn’t work. Then I changed amp plugin, but it doesn’t work with that plugin either. It only works with https://www.ads-software.com/plugins/amp/

    Every plugin has different function to identify whether it’s amp page.. if that information is helpful to you to help me resolve this issue.

    Thread Starter jamesja

    (@jamesja)

    Hi again, I tested same amp plugin with w3 on a testing site. On my testing site it works when I enable AMP extension, but on main site it doesn’t work.

    Any suggestion how should I troubleshoot this?

    Testing site is http and main https.

    • This reply was modified 5 years, 5 months ago by jamesja.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesja,

    Thank you for your reply. I would just like to clarify a couple of things.
    When you are using your theme’s AMP plugin when a post is updated that post cache is not cleared but when you are using https://www.ads-software.com/plugins/amp/ cache is cleared and fresh version is available to guests right away?
    Can you please share what theme you are using and the AMP plugin?
    Also, when you say you tested the same AMP plugin on a testing site, are you referring to your theme’s AMP plugin or https://www.ads-software.com/plugins/amp/

    Thread Starter jamesja

    (@jamesja)

    Hi, thank you for your reply. I removed theme amp plugin due to some issues.

    Currently
    I am using this theme: https://demo.betterstudio.com/publisher/
    this plugin: https://www.ads-software.com/plugins/accelerated-mobile-pages/

    After enabling AMP extension in W3, cache is cleared on my testing site (same theme, same amp plugin). But on main site it doesn’t clear. I am unable to figure out the reason.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesja,

    Thank you for your reply.
    To confirm, If you are using your theme AMP plugin and https://www.ads-software.com/plugins/accelerated-mobile-pages/ on your live website the cache is not cleared and it’s only cleared on AMP pages when using https://www.ads-software.com/plugins/amp/
    Is this correct?

    Thread Starter jamesja

    (@jamesja)

    Hi, I have been investigating this issue and unable to figure out what’s the issue.

    I set up a fresh site and this issue is happening on it. Can I send you login so you can check?

    Plugins I have are:
    Classic Editor
    W3 Total Cache
    AMP – https://www.ads-software.com/plugins/amp/

    Issue is: When I modify any post content, cache is cleared on non-amp page right away, but it’s not cleared on amp pages and I have to wait until it automatically expire.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesja

    Just to confirm, when you modify any post content and publish, reloading the AMP page is not showing the new content?

    Thread Starter jamesja

    (@jamesja)

    Ya exactly.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesja
    I’ve tested this personally.
    Downloaded the https://www.ads-software.com/plugins/amp/
    Activated AMP extension in Performance>Extensions.
    In Performance>Page Cache, Purge Policy, I’ve enabled the following:
    Front page
    Post page
    Blog feed
    rss2 (default)
    Once I’ve created a new post or edited the existing one cache is cleared on both non-amp and AMP pages. Simply reloading those pages shows new content.

    Thread Starter jamesja

    (@jamesja)

    Hello, first of all thank you so much for patiently helping me until now. I am back with more testing.

    My new findings are when I have page cache on “memcached” or “Disk Basic”, this issue happens. When I switch page caching to “Disk Enhanced”, this issue doesn’t happen. I tested this with 3 different servers.

    I can give you login to my testing site, should you wish to check there.

    Edit: When I did testing, I first opened a particular post on both amp and non-amp versions (so cache version is created, no traffic on my testing sites). Then I edited that same post and refreshed both pages. Non-amp version reflected those changes right away, while AMP pages didn’t when page cache was set on “Memcached” or “Disk Basic’. When page cache was set on “Disk Enhanced”, changes reflected to both AMP and Non-AMP pages.

    Regards,

    • This reply was modified 5 years, 5 months ago by jamesja.
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesja

    Just to confirm what is the AMP URL structure?
    We support only /amp/ URL structure at the moment. “?amp” will be supported in next release.

    Thread Starter jamesja

    (@jamesja)

    Hello, I am using /amp/ only, at the end of post.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @jamesja

    Can you please change the following lines in Extension_Amp_Plugin.php 71 and check if it works?
    Line 71
    $amp_urls[] = trailingslashit( $url ) . 'amp';
    to
    $amp_urls[] = trailingslashit( $url ) . 'amp/';

    Thread Starter jamesja

    (@jamesja)

    Thank you so much. That fixed it!

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Clearing AMP page cache’ is closed to new replies.