• Resolved gdoll47

    (@gdoll47)


    Hi,
    I use woocommerce and by default the cart and checkout pages are not cached.I also want to include a single product page from getting cached. I am using a regular page that I have added a woocommerce product shortcode onto, and I set this page ID to not get cached. This is not working though, the page is still getting cached. If I set another regular page though to not be cached, it works for that page. Why is this not working for a page with a product shortcode placed onto it?

    https://ww.wp.xz.cn/plugins/cachify/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks for your report!

    WooCommerce sets a DONOTCACHEPAGE constant on pages like the shopping cart and the account page. Cachify respects that flag and automatically excludes those pages from being cached.

    After that, Cachify checks the excluded post IDs and compares them with the current page (using $GLOBALS['wp_query']->get_queried_object_id()). This works for any post type.

    Maybe some other plugin is interfering with the cache config. Try disabling all other plugins besides WooCommerce and Cachify, flush the cache and see if the problem still exists.

    Also, can you please share your Cachify config with us?

    Thread Starter gdoll47

    (@gdoll47)

    Hi,
    thanks for your reply. I know Woocommerce sets the donotcachepage, but not on individual product pages which theoretically could be cached, but since they display the current stock status it does not update when the page is cached, therefore I also wanted to exclude my single product pages. But actually, I disabled the plugin and uninstalled it, and reinstalled it again and now it is working! So I don’t know what was going on there, but most importantly it is working now. Thanks for your support!

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

The topic ‘Problem excluding page from caching’ is closed to new replies.