• Resolved yourchoice

    (@yourchoice)


    Hi

    Do we have to set special things or exclude the guestbook from cache when we want to use LiteSpeed Cache?

    Thanks very much.

    Best regards
    Mike

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Marcel Pol

    (@mpol)

    Hi Mike,

    Excluding the page might be a good idea.

    I looked into this caching plugin. There is a method _purge_pages() but it’s a private function. There was no documentation how to call this from another plugin.

    Thread Starter yourchoice

    (@yourchoice)

    Hi Marcel

    Thanks for your response.

    I think, you have to purge like this:

    if (defined(‘LSCWP’)) {
    do_action( ‘litespeed_purge_post’, $post_id );
    }

    See the documentation of LiteSpeed Cache:

    https://docs.litespeedtech.com/lscache/lscwp/api/#purge

    Best regards
    Mike

    Plugin Author Marcel Pol

    (@mpol)

    Hi Mike,

    Nice, thank you. I was looking for a function to call, didn’t think of a hook ??

    There is support in the development version of the plugin. Could you test if it works for you?
    https://codeberg.org/cyclotouriste/gwolle-gb

    Regards, Marcel

    Thread Starter yourchoice

    (@yourchoice)

    Hi Marcel

    Thanks for your response. Cool that you already implemented it. But before I will try it out. Why did you check if LSCWP_V exists? Should it not be LSCWP?
    Or perhaps you have to check both? LSCWP_V and LSCWP?

    Thanks.

    Best regards
    Mike

    Plugin Author Marcel Pol

    (@mpol)

    In my version there was no LSCWP defined ?? The hook would not be added. LSCWP_V does exist.

    Thread Starter yourchoice

    (@yourchoice)

    Do you have only the LiteSpeed caching plugin or also the LiteSpeed Web server running? Perhaps this is the difference between LSCWP and LSCWP_V… I don’t know ??
    But anyway, if it works, it’s cool!



    Plugin Author Marcel Pol

    (@mpol)

    Ah, that could be.
    And no, I haven’t tested it with the Litespeed server. So in my test of this code it doesn’t do anything. I was hoping you could confirm it works as it should ??

    Thread Starter yourchoice

    (@yourchoice)

    I think I will ask the developers of the plugin what’s the difference.

    Thread Starter yourchoice

    (@yourchoice)

    Hi Marcel

    I have some informations from the LiteSpeed developers and want to try it out with your guestbook version.

    What I have to do in the guestbook for that the cache should be deleted? Adding a new entry?

    Plugin Author Marcel Pol

    (@mpol)

    Hello Mike,
    Yes, adding a new entry should do it. Preferably on the frontend, where the shortcode is on a page.

    Thread Starter yourchoice

    (@yourchoice)

    Hi Marcel

    Ok, I will test it and give you feedback.

    Thread Starter yourchoice

    (@yourchoice)

    Hi Marcel

    I did some tests. As I see, it never comes into the code of the method gwolle_gb_clear_cache.

    Do I have to make a specific setting in the guestbook?

    Thanks very much.

    Best regards

    Mike

    Plugin Author Marcel Pol

    (@mpol)

    Hi Mike,

    Ouch, there turned out to be another bug. There is a meta key saved for book_id on the guestbook page, but not always.

    I did test it out myself on litespeed, it does work now.

    Thread Starter yourchoice

    (@yourchoice)

    Hi Marcel

    Ok, very good.

    What still confuses me a bit is that LSCWP_V is defined instead of LSCWP. Maybe you should query both?

    Plugin Author Marcel Pol

    (@mpol)

    I don’t think it’s an issue.

    I assume LSCWP is defined by the Litespeed server, LSCWP_V is defined by the WordPress plugin. Only if both are running (and defined), will the action be executed with hooks attached to it. Otherwise it’s an empty action that doesn’t do anything.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Gwolle Guestbook with LiteSpeed Cache’ is closed to new replies.