• Resolved mikeyb31

    (@mikeyb31)


    Hi guys,

    I don’t really understand the “WP_CACHE” constant… with cache files cleared and “WP_CACHE” set to false pages are still cached by/served up by the plugin? I’ve had a look at the source and it seems the only way to disable the cache programmatically is to use the “bypass_cache” filter?

    Surely it makes sense that if I’m setting “WP_CACHE” to false then all cache mechanics should be disabled?

    I’m having to include the “DONOTCACHEPAGE” constant in my local/dev config file to *trick* cache enabler into thinking it’s WooCommerce…

    I appreciate your thoughts!

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter mikeyb31

    (@mikeyb31)

    This is doing the trick too:

    if (defined(‘WP_CACHE’) && WP_CACHE === false) {
    add_filter(‘bypass_cache’, function () {
    return true;
    });
    }

    If you want to perform your own custom exclusions from Cache Enabler you’ll need to either use the DONOTCACHEPAGE constant or use the bypass_cache filter.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP_CACHE’ is closed to new replies.