• Resolved AWOL

    (@awol)


    Hi,

    Report: HVKWJSXB

    Site: https://sentlive.com

    I am getting cache-control no-cache, must-revalidate, max-age=0, no-store, private and x-litespeed-cache-control no-cache on all of the pages on my site. I have gone through the debug process, removed all the excludes but nothing has changed.

    Site Health is also giving me this: Page cache is not detected and the server response time is slow – this is what got me to check things in the first place.

    Can you advise how to proceed now? The server is LiteSpeed before you ask.

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter AWOL

    (@awol)

    Hi @qtwrk,

    I have been in discussion with Better Messages, and here is a couple of their pertinent responses;

    Sorry, but I cant find where Better Messages can be calling that hook. Not sure why that is the issue only when Better Messages is active, maybe there is something else which calling the hook when Better Messages making REST requests.

    After I told them it may not be specifically transition_post_status (I quoted your reply to me about this);

    I do not know where Better Messages can do that on every page load, you better test clean wordpress install with Better Messages and Litespeed only, as I think the issue is not in better messages.

    It’s not possible to change the load of better messages.

    As it stands that only leaves me with two choices (other than living with the problem) – either find a replacement for BM or a replacement for LS Cache, as neither of you seem willing to look into this further. I have had problems with every cache plugin I have tried, with yours being the best so far, and given that my host uses the LS server it doesn’t make sense for me to switch, but unfortunately I am yet to find a messaging/chat plugin that has the features matching BM.

    Is there any way that this can be dealt with by providing some code that prevents the cache purge on post status change? It is not really, I don’t think, something that my site needs, although maybe you can explain why it is needed? The cache gets purged with every plugin update and they are almost daily, which is more than enough for my uses.

    Plugin Support qtwrk

    (@qtwrk)

    you can control the purge on upgrade in Cache -> Purge

    for the transition_post_status thing , you can add this to theme’s functions.php

    function lscwp_custom_function( $new_status, $old_status, $post ) {
        if ( $old_status == $new_status )
        {
            ob_start( function($buffer){
        @header('X-LiteSpeed-Purge: nothing');
        return $buffer;
        } );
        }
    }
    add_action( 'transition_post_status', 'lscwp_custom_function', 11, 3 );

    which will suppress the purge action on this action , but I don’t know if it will affect your normal posting capability , as they use same action

    Thread Starter AWOL

    (@awol)

    Hi @qtwrk,

    Thank you for the code snippet, but I have added it to my functions and nothing has changed. That suggests to me that it is not transition_post_status causing the problem. Every reload of most of my pages is a miss when logged in, with only a couple of them getting hit, but it doesn’t seem to be consistent. I am wondering if there is some misconfiguration in the LS Cache settings that could be a factor. I am still investigating on a staging site as to whether Better Messages or another plugin is causing the problem, but this is a long process – would you have a list of plugins that have or are known to cause issues that I could check against to help speed the process up? Also I have Buddypress which I gather has had issues previously with caching due to the nature of what it does – not all of my pages are BP pages but could this be connected as this is only impacting logged in users?

    Plugin Support qtwrk

    (@qtwrk)

    commonly , when user login , it will purge the private cache , and private cache is usually short-lived , but if you refresh it like twice or thrice , does it still give you cache miss all the time ?

    Thread Starter AWOL

    (@awol)

    Hi @qtwrk,

    Sorry for the slow response – I thought I had identified the problem plugin (on a staging site) which unfortunately was a page builder type plugin that provides lots of enhanced and extra Gutenberg blocks that I have been using extensively, so went through the painstaking process of replacing all uses of it on my pages and widgets, only to find after doing so and deleting the plugin that I still have a problem. I am getting miss every time for a logged in user on my site, and even stranger getting no cache every time whether logged in or out on the staging site! This is after 3 or 4 reloads. I am now going through the staging site again, deactivating/reactivating plugins etc.



    Thread Starter AWOL

    (@awol)

    Just an update – I have been busy replacing/removing plugins, tweaking code and settings and while I think my site is still too slow, the cache now appears to be working as it should. Thank you for your help.

Viewing 6 replies - 16 through 21 (of 21 total)
  • The topic ‘No cache’ is closed to new replies.