• Resolved aberbenni

    (@aberbenni)


    After activating page caching in my website I found the log full of:

    WP Optimize page cache - https://getwpo.com - page not served from cache because: In the settings, caching is disabled for matches for one of the current request's GET parameters

    At the and of page I found:
    WP Optimize page cache - https://getwpo.com - page NOT cached because: DONOTCACHEPAGE constant or wpo_can_cache_page filter forbade it

Viewing 11 replies - 1 through 11 (of 11 total)
  • Hi,

    Currently, these appear when WP_DEBUG is true.
    The one at the end of the page will still show with WP_DEBUG enabled, but we’ve added an other conditions to enable the ones in the error log, which will be in the next release.

    Marc.

    Thread Starter aberbenni

    (@aberbenni)

    Thanks for the info.
    Now the question is why pages are not cached? I have no evidence of any specific setting on those pages. They are only normal text pages.

    The message in the log file are when it’s not a normal page (e.g. sitemap.xml, rest api…)

    The second message shows that DONOTCACHEPAGE was defined. This is usually done by certain plugins to prevent caching of their pages. For example WooCommerce uses this to prevent caching on the cart and checkout pages, or on the my account pages.

    Thread Starter aberbenni

    (@aberbenni)

    I have no WooCommerce plugin. Only normal (text) pages on this website. Is there a way to print post ID or page path in log so I can debug all pages with problems instead of navigating every page and search for WP Optimize page cache comment?

    Hi,
    In your first message you say

    At the and of page I found:
    WP Optimize page cache – https://getwpo.com – page NOT cached because: DONOTCACHEPAGE constant or wpo_can_cache_page filter forbade it

    So that would correspond to the page visited. WooCommerce is only an example, as other plugins use the constant DONOTCACHEPAGE, which is a standard for preventing a page from being cached. So you might want to see which plugins could add it.

    The messages in the error logs are for requests that do not have the wp_footer hook (so not normal pages). The next release will also contain the relevant URL.

    Marc.

    Thread Starter aberbenni

    (@aberbenni)

    Digging in the website configuration and plugins I found the plugin that is causing conflicts: WP Statistics

    Disabling this plugin cache works again.

    Thread Starter aberbenni

    (@aberbenni)

    I don’t know this plugin, but there’s a section in their FAQs about compatibility with cache plugins:
    https://www.ads-software.com/plugins/wp-statistics/#does%20wp%20statistics%20work%20with%20caching%20plugins%3F
    Did you look at that?

    Marc.

    Thread Starter aberbenni

    (@aberbenni)

    Yes, everything is configured as shown there.
    I’m doing further tests, both using the preload or on demand cache.
    I always have the log:

    <!– WP Optimize page cache – https://getwpo.com – page not served from cache because: In the settings, caching is disabled for matches for one of the current request’s GET parameters –>

    Testing cache issues is tricky but I’m purging server an browser cache every time.

    I have no evidence of any plugin that is setting DONOTCACHEPAGE value explicitly.

    I will wait for the next version so that I can see in the log the url of the pages that show the problem.

    Just to clarify, what’s is in the log file is generated by content other than normal html pages. E.g. sitemaps.xml, the rest API, and some ajax requests. So its value is minimal compared to the comment tag at the end of a page.

    Thread Starter aberbenni

    (@aberbenni)

    Every time I load any text page I have a

    <!-- WP Optimize page cache - https://getwpo.com - page not served from cache because: In the settings, caching is disabled for matches for one of the current request's GET parameters -->

    line in log.

    I think this could be due to /wp-json/wpstatistics/v1/hit that is called, by WP Statistics plugin, every time a cached page is loaded with the aim of increasing the page hit count.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘page NOT cached because’ is closed to new replies.