• Resolved Seagull87

    (@flagship890)


    Hi,
    After I update our sites via WP-CLI and clear the beaver builder and litespeed caches, some sites are 404ing on some css files namely in this directory:
    /wp-content/uploads/bb-plugin/cache/8-layout.css?ver=9747db8d5ed9539653709916180ee4ae

    The only thing that solves it is clearing the ls cache again but I was wondering what’s happening here. What causes the files to get created on a ls clear? The files that get created always have the same name of the ones that were 404ing including the ver=.

    This is the wpcli code I use:

    wp core update && wp plugin update --all && wp theme update --all
    wp core language update && wp language plugin update --all && wp language theme update --all 
    sleep 10
    wp beaver clearcache && wp litespeed-purge all
Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    due the way how LSCache engine works (as it is integrated in the webserver) , it needs a targeted domain know to know which (site’s) page to purge

    when you run everything in command line , as no HTTP request is involved, that means no webserver is involved , and since cache engine is not involved , it doesn’t know what to purge

    for command line initiated task , there is a “delay purge” added into database cache queue that will be triggered next time PHP is triggered , but sometimes it does not respond in time

    try , after your wp command lines , then run a curl with random query string , like https://youdomain.com/?123 to bypass cache and hit PHP , see if it purges properly

    Thread Starter Seagull87

    (@flagship890)

    Thanks for your reply it turned out to be the beaver builder plugin clearing it’s cache.

    When BB clears it’s cache our sites always get 404s on files from /wp-content/uploads/bb-plugin/cache.

    Purging the litespeed cache solves it. Unfortunately updating the version of bb also causes it to do a cache clear the next time the back end is loaded. So the sites will always break eventually once they are logged in. (if litespeed is not purged at the same time)

    Plugin Support qtwrk

    (@qtwrk)

    if BB has some kind of hook you can use when it updates , you can hook it with do_action( 'litespeed_purge_all' ); to tell LSCWP to purge it

    Thread Starter Seagull87

    (@flagship890)

    Thanks for this I’ll bare it in mind.
    We’ve just written something into our update routines to make bb skip the extra cache clear when logging into the back end.

    Beaver Builder does not do anything special with LS, we used to but LS added thier own support a couple of years ago:
    https://github.com/litespeedtech/lscache_wp/blob/master/thirdparty/beaver-builder.cls.php

    You should be able to use the upgrader_process_complete action to see when a plugin has updated:
    https://developer.www.ads-software.com/reference/hooks/upgrader_process_complete/

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Cache clear after updates’ is closed to new replies.