• Resolved jaspix

    (@jaspix)


    I’m having issues trying to get the cache working. Checking the headers I get ‘x-litespeed-cache-control public,max-age=604800’ but no ‘X-LiteSpeed-Cache’ header. Checking the logs I get these two particular lines that I suppose it explains why it’s not working but I have no idea what it means.

    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] ?? ------POST HTTP/1.1 (HTTPS) /
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] Query String: wc-ajax=get_refreshed_fragments
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] HTTP_REFERER: https://kawaiisale.com/
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/111.0.0.0 Safari/537.36
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] Accept: */*
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] Accept Encoding: gzip
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] Cookie _lscache_vary: admin_bar:1;logged-in:1;role:99,0
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] X-LSCACHE: true
    03/21/23 02:35:26.436 [162.158.225.155:26658 1 mUT] LSCACHE_VARY_COOKIE: ,wp-postpass_6d5cd5804387426a1b88cbb4f1f1f480
    03/21/23 02:35:26.569 [162.158.225.155:26658 1 mUT] [Ctrl] X Cache_control -> private ( logged in user )
    03/21/23 02:35:26.569 [162.158.225.155:26658 1 mUT] [Router] get_role: administrator,yith_affiliate
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] [Media] init
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] ?? Suppress default WP lazyload
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] [Avatar] init
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] [LQIP] init
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] [CDN] init
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] ? Task init
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] [Router] LSCWP_CTRL bypassed empty
    03/21/23 02:35:26.570 [162.158.225.155:26658 1 mUT] [GUI] init
    03/21/23 02:35:26.631 [162.158.225.155:26658 1 mUT] ?? [Tag] Add --- HTTP.200
    03/21/23 02:35:26.632 [162.158.225.155:26658 1 mUT] [Ctrl] X Cache_control init on
    03/21/23 02:35:26.835 [162.158.225.155:26658 1 mUT] ?? [Tag] Add --- HTTP.200
    03/21/23 02:35:26.837 [162.158.225.155:26658 1 mUT] [Core] CHK html bypass: miss footer const
    03/21/23 02:35:26.837 [162.158.225.155:26658 1 mUT] [Ctrl] X Cache_control off - Not GET method: POST
    03/21/23 02:35:26.837 [162.158.225.155:26658 1 mUT] [Ctrl] X Cache_control -> no Cache => LiteSpeed\Control::set_nocache()@372 => LiteSpeed\Control->finalize()@682 => LiteSpeed\LSC->send_headers()@540 => WP_Hook->apply_filters(,ARRAY)@308 => WP_Hook->do_action(ARRAY)@332 =>
    /home/kawaiisale.com/public_html/wp-includes/load.php@517
    03/21/23 02:35:26.837 [162.158.225.155:26658 1 mUT] [Vary] role in vary_group [group] 99,0
    03/21/23 02:35:26.837 [162.158.225.155:26658 1 mUT] [Vary] show_admin_bar_front: true
    03/21/23 02:35:26.837 [162.158.225.155:26658 1 mUT] [Vary] admin bar : true
    03/21/23 02:35:26.837 [162.158.225.155:26658 1 mUT] [Vary] no custimzed vary
    03/21/23 02:35:26.838 [162.158.225.155:26658 1 mUT] [Core] Silence Comment due to REST/AJAX
    03/21/23 02:35:26.838 [162.158.225.155:26658 1 mUT] ?? X-LiteSpeed-Cache-Control: no-cache
    03/21/23 02:35:26.838 [162.158.225.155:26658 1 mUT] [Core] CHK html bypass: miss footer const
    03/21/23 02:35:26.838 [162.158.225.155:26658 1 mUT] [Media] bypass: Not frontend HTML type
    03/21/23 02:35:26.838 [162.158.225.155:26658 1 mUT] GUI bypassed by no counter
    03/21/23 02:35:26.838 [162.158.225.155:26658 1 mUT] Response headers --- array (
    0 => 'X-Content-Security-Policy: default-src \'self\'; script-src \'self\' https://hcaptcha.com https://*.hcaptcha.com; frame-src \'self\' https://hcaptcha.com https://*.hcaptcha.com; style-src \'self\' https://hcaptcha.com https://*.hcaptcha.com; connect-src \'self\' https://hcaptcha.com https://*.hcaptcha.com; unsafe-eval \'self\' https://hcaptcha.com https://*.hcaptcha.com; unsafe-inline \'self\' https://hcaptcha.com https://*.hcaptcha.com;',
    1 => 'Access-Control-Allow-Origin: https://kawaiisale.com',
    2 => 'Access-Control-Allow-Credentials: true',
    3 => 'X-Content-Type-Options: nosniff',
    4 => 'X-Robots-Tag: noindex',
    5 => 'X-LiteSpeed-Tag: 070_tag_priv,public:070_HTTP.200,public:070_HTTP.200',
    6 => 'Content-Type: application/json; charset=UTF-8',
    7 => 'Expires: Wed, 11 Jan 1984 05:00:00 GMT',
    8 => 'Cache-Control: no-cache, must-revalidate, max-age=0',
    9 => 'X-LiteSpeed-Cache-Control: no-cache',
    )
    03/21/23 02:35:26.838 [162.158.225.155:26658 1 mUT] End response

    Any help would be appreciated.

    • This topic was modified 1 year, 8 months ago by jaspix.

    The page I need help with: [log in to see the link]

Viewing 10 replies - 1 through 10 (of 10 total)
  • I get ‘x-litespeed-cache-control public,max-age=604800’ but no ‘X-LiteSpeed-Cache’ header.

    Because of 'X-LiteSpeed-Cache-Control: no-cache', so check your settings in cache plugin.

    Thread Starter jaspix

    (@jaspix)

    I made sure everything is enabled in the settings.

    If page has a no-cache header then this doesn’t come from nothing. There must be any setting that causes it, but whenever you check if cache works, logoff from WP. Otherwise you always get no-cache or private cache depending on settings.

    Thread Starter jaspix

    (@jaspix)

    I get the same results applying the default presets. I checked this and applied the patch mentioned. Instead of missing footer I get ‘wp doing ajax’. I also tried deactivating all non-essential plugins with no luck.

    The presets have nothing to with caching. They are only related to optimizations.

    Check if cache is enabled and also check if there are any excludes defined.

    Thread Starter jaspix

    (@jaspix)

    Cache is enabled and there are no excludes defined.

    Then create a blank PHP file, copy this code in this file, transfer it to your server where WP is installed and run the file in your browser. You should see on. The filename doesn’t matter.

    <?php
    echo $_SERVER['X-LSCACHE'];
    Thread Starter jaspix

    (@jaspix)

    I get ‘on,crawler’

    There are plugin makers who know how to disable the LiteSpeed plugin cache because they don’t want the plugin to cache a page, although LScache has a solution for pretty much everything. At the moment this is just a guess, but if all other reasons can be ruled out, then it stands to reason that you have installed a plugin that prevents caching. The only problem is that we can’t know which plugin uses this no-cache function. It is therefore up to you to find out which plugin is preventing caching.

    Thread Starter jaspix

    (@jaspix)

    It ended being a file permission issue. Fixed that and now it’s working.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Cache not working’ is closed to new replies.