• Resolved Egl

    (@egletiere)


    Hello,

    I’ve noticed both on our production and staging site that when AutomateWoo plugin is active our homepage (and only the homepage) gets  LSCache is not supported, x-litespeed-cache-control: no-cache while all other pages get x-litespeed-cache: hit

    When deactivating AutomateWoo, the homepage gets x-litespeed-cache: hit too.

    All options in AutomateWoo are inactive so I don’t understand what’s really going on. We have only one manual workflow configured and did not run it.

    I ran the following debug with AutomateWoo active and it returns “DONOTCACHEPAGE is NOT set on this page.” for all pages so I guess the plugin does not add DONOTCACHEPAGE but still it somehow disrupts Litespeed Cache:

    if (defined(‘DONOTCACHEPAGE’)) {
    error_log(‘DONOTCACHEPAGE is set to true on this page.’);
    } else {
    error_log(‘DONOTCACHEPAGE is NOT set on this page.’);
    }

    Your support would be helpfull so that we could keep this plugin active and not use this filter in functions.php: add_filter( ‘litespeed_const_DONOTCACHEPAGE’, ‘__return_false’ );

    Report number: AMMHQVOD

    Report date: 03/19/2025 10:40:16

    PS: I was not able to reproduce the issue on another wordpress installation.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Egl

    (@egletiere)

    PPS issue still happens when homepage html contains only get_header and get_footer

    Plugin Support litetim

    (@litetim)

    @egletiere AutomateWoo is free plugin?

    Plugin Support qtwrk

    (@qtwrk)

    huh ?

    you mean the other plugin did not define DONOTCACHEPAGE , but LSCWP still does not cache ?

    you can enable debug log , the log will give reason why it decides to no cache

    Thread Starter Egl

    (@egletiere)

    I’ve removed this from functions.php add_filter( ‘litespeed_const_DONOTCACHEPAGE’, ‘__return_false’ ); and retested

    With AutomateWoo plugin active:

    • all pages BUT homepage 1st visit x-litespeed-cache: miss (normal)
    • all pages BUT homepage 2nd visit x-litespeed-cache: hit (normal)
    • homepage all visits: x-litespeed-cache-control: no-cache (not normal)
      In logs all visits on all pages:
      [Ctrl] ❌ forced no cache [reason] DONOTCACHEPAGE const (not normal)
      X-LiteSpeed-Cache-Control: no-cache (not normal)

    With AutomateWoo plugin deactivated homepage behaves like other pages: 1st=miss, 2nd=hit but in logs DONOTCACHEPAGE cons and no-cache.

    Thread Starter Egl

    (@egletiere)

    I don’t think AutomateWoo is a free plugin

    Plugin Support qtwrk

    (@qtwrk)

    something defined DONOTCACHEPAGE , which will lead to our plugin to honour it

    Thread Starter Egl

    (@egletiere)

    AutomateWoo has this code somewhere and it MIGHT be the culprit but I don’t have any more time to test. I thought it would be something simpler.

    /**

    • Define cache blocking constants if not already defined
    • @since 3.6.0
      */
      function aw_set_nocache_constants() {
      if ( ! defined( ‘DONOTCACHEPAGE’ ) ) {
      define( “DONOTCACHEPAGE”, true );
      }
      if ( ! defined( ‘DONOTCACHEOBJECT’ ) ) {
      define( “DONOTCACHEOBJECT”, true );
      }
      if ( ! defined( ‘DONOTCACHEDB’ ) ) {
      define( “DONOTCACHEDB”, true );
      }
      }

    Thanks for your help!

    Plugin Support qtwrk

    (@qtwrk)

    the add_filter you used before, is the solution , otherwise you need to ask this woo plugin to update its code

    Plugin Support litetim

    (@litetim)

    @egletiere I would look into where function aw_set_nocache_constants is used and try to remove it from run.
    With remove_action OR remove_filter.

    Thread Starter Egl

    (@egletiere)

    Thanks for your help

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

The topic ‘Automatewoo donotcache’ is closed to new replies.