LiteSpeed plugin update purges cache server-wide
-
Hello,
A LiteSpeed plugin update on one website purges cache for all websites on the server.
Is it a known behavior? Can it be prevented?
Thanks.
-
this usually happens when all sites are configured to use same cache directory , where it supposedly , should have isolated and individual cache storage path
please explain a bit what is your server env ?
Thanks, @qtwrk.
I’m using Shock Hosting‘s Shared Hosting.
I’m not an expert in server environments.
What information should I look for?
emm , yes, I just noticed from source code, it does
*
where I think it should be per-site-tag , I am not sure why is that, checking with our devsactually I further looked into it and test on my server, it does not purge it server-wide
2024-08-29 14:59:24.638258 [DEBUG] [24193] [T0] [79.117.xxx.xxx:63428-H3:098570D6249BAD58-632#APVH_sample_domain.com:lsapi] Response Header: 'X-LiteSpeed-Purge: public,4c4_'
2024-08-29 14:59:24.638260 [DEBUG] [24193] [T0] [79.117.xxx.xxx:63428-H3:098570D6249BAD58-632#APVH_sample_domain.com:lsapi] append response header: X-LiteSpeed-Purge: public,4c4_it purges by per site tag
may I know what is your server environment ?
go to toolbox -> debug setting , enable debug log , set debug level to advance , add
wp-admin/admin-ajax.php
to debug include URI , then do a plugin upgradethen check the log , see what it shows in the last line
you should see somethign like this https://pastebin.ubuntu.com/p/mQmr2ncphn/
the last few lines
10 => 'X-LiteSpeed-Purge: public,4c4_',
, this one is the purge tag, see what it gives on your siteI have explained what I have checked and tested , if you see different behavior , please share me the log as I requested
I did as you requested.
This is what I got:
10 => 'X-LiteSpeed-Purge: public,*',
This is from the Purge Log:
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] X-LiteSpeed-Purge: public,* => LiteSpeed\LSC->send_headers()@624 => WP_Hook->apply_filters(,ARRAY)@324 => WP_Hook->do_action(ARRAY)@348 =>
A wildcard seems to be used.
Let me know if anything more is needed.
Thanks.
thanks , this is helpful information , could you please share the full log
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462]
, as all lines that contains462
, this is log tag , the full log with this tag.@qtwrk, let me know if this is what you need:
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] ?? ------GET HTTP/1.1 (HTTPS) /wp-admin/admin-ajax.php
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] Query String: action=wp_service_worker
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] HTTP_REFERER: https://hobbies4.life/wp-admin/admin-ajax.php?action=...
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit...
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] Accept: */*
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] Accept Encoding: gzip, br
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] Cookie _lscache_vary: f050ff6f51cf8a68e77c92f3fe5bf994
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] X-LSCACHE: true
09/05/24 11:06:50.144 [5.61.122.206:31012 1 462] [Data] Checking table url
09/05/24 11:06:50.144 [5.61.122.206:31012 1 462] [Data] Existed
09/05/24 11:06:50.144 [5.61.122.206:31012 1 462] [Data] Checking table url_file
09/05/24 11:06:50.145 [5.61.122.206:31012 1 462] [Data] Existed
09/05/24 11:06:50.146 [5.61.122.206:31012 1 462] ??? [Activation] update_files
09/05/24 11:06:50.151 [5.61.122.206:31012 1 462] [Rules] Update frontend rules
09/05/24 11:06:50.153 [5.61.122.206:31012 1 462] [Data] Updated version to 6.5.0.1
09/05/24 11:06:50.156 [5.61.122.206:31012 1 462] ?? added * => LiteSpeed\Root::debug(?? added *,8)@51 => LiteSpeed\Purge->_add(ARRAY)@501 => LiteSpeed\Purge->_purge_all_lscache()@231 => LiteSpeed\Purge->_purge_all()@195 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145 => LiteSpeed\Conf->_conf_db_init()@107 => LiteSpeed\Conf->init()@36 => LiteSpeed\LSC->__construct()@50
09/05/24 11:06:50.158 [5.61.122.206:31012 1 462] ?? X-LiteSpeed-Purge: public,*
09/05/24 11:06:50.163 [5.61.122.206:31012 1 462] ?? added _MIN => LiteSpeed\Root::debug(?? added _MIN,8)@51 => LiteSpeed\Purge->_add(ARRAY)@501 => LiteSpeed\Purge->_purge_all_cssjs()@373 => LiteSpeed\Purge->_purge_all()@196 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145 => LiteSpeed\Conf->_conf_db_init()@107 => LiteSpeed\Conf->init()@36 => LiteSpeed\LSC->__construct()@50
09/05/24 11:06:50.164 [5.61.122.206:31012 1 462] ?? X-LiteSpeed-Purge: public,*
09/05/24 11:06:50.167 [5.61.122.206:31012 1 462] ?? added _LOCALRES => LiteSpeed\Root::debug(?? added _LOCALRES,8)@51 => LiteSpeed\Purge->_add(ARRAY)@501 => LiteSpeed\Purge->_purge_all_localres()@347 => LiteSpeed\Purge->_purge_all()@197 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145 => LiteSpeed\Conf->_conf_db_init()@107 => LiteSpeed\Conf->init()@36 => LiteSpeed\LSC->__construct()@50
09/05/24 11:06:50.167 [5.61.122.206:31012 1 462] ?? X-LiteSpeed-Purge: public,*
09/05/24 11:06:50.167 [5.61.122.206:31012 1 462] ?? Failed to flush object cache due to object cache not enabled
09/05/24 11:06:50.168 [5.61.122.206:31012 1 462] ?? Reset opcode cache
09/05/24 11:06:50.168 [5.61.122.206:31012 1 462] ?? Purge all => LiteSpeed\Root::debug(?? Purge all ,3)@51 => LiteSpeed\Purge->_purge_all()@212 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145
09/05/24 11:06:50.180 [5.61.122.206:31012 1 462] ?? posting to : https://wpapi.quic.cloud/ver_check
09/05/24 11:06:50.577 [5.61.122.206:31012 1 462] ?? response ok --- array (
'dev' => '6.4.1',
'latest' => '6.4.1',
)
09/05/24 11:06:50.579 [5.61.122.206:31012 1 462] ?? posting to : https://wpapi.quic.cloud/ver_check
09/05/24 11:06:50.975 [5.61.122.206:31012 1 462] ?? response ok --- array (
'dev' => '6.4.1',
'latest' => '6.4.1',
)
09/05/24 11:06:50.975 [5.61.122.206:31012 1 462] [Data] Checking table url
09/05/24 11:06:50.976 [5.61.122.206:31012 1 462] [Data] Existed
09/05/24 11:06:50.976 [5.61.122.206:31012 1 462] [Data] Checking table url_file
09/05/24 11:06:50.976 [5.61.122.206:31012 1 462] [Data] Existed
09/05/24 11:06:50.976 [5.61.122.206:31012 1 462] ??? [Activation] update_files
09/05/24 11:06:50.977 [5.61.122.206:31012 1 462] [Cloudflare] _cloudflare_call [URL] https://api.cloudflare.com/client/v4/zones?status=active&match=all&name=hobbies4.life
09/05/24 11:06:52.051 [5.61.122.206:31012 1 462] [Cloudflare] _cloudflare_call called successfully
09/05/24 11:06:52.051 [5.61.122.206:31012 1 462] [Cloudflare] fetch_zone exact matched
09/05/24 11:06:52.051 [5.61.122.206:31012 1 462] [Cloudflare] Get zone successfully [ID] a0f7fc9dd3a63143316dda5a513181e7
09/05/24 11:06:52.651 [5.61.122.206:31012 1 462] [Ctrl] X Cache_control -> no Cache ( logged in user ) => LiteSpeed\Control::set_nocache(( logged in user ))@409 => LiteSpeed\Vary->after_user_init()@92 => LiteSpeed\LSC->after_user_init()@255 => WP_Hook->apply_filters(ARRAY)@324 => WP_Hook->do_action(ARRAY)@348 =>
/home/asafdevc/hobbies4.life/wp-settings.php@517
09/05/24 11:06:52.653 [5.61.122.206:31012 1 462] [Media] init
09/05/24 11:06:52.654 [5.61.122.206:31012 1 462] [LQIP] init
09/05/24 11:06:52.655 [5.61.122.206:31012 1 462] [CDN] init
09/05/24 11:06:52.655 [5.61.122.206:31012 1 462] [Router] CDN bypassed: ajax call from admin
09/05/24 11:06:52.655 [5.61.122.206:31012 1 462] ? Init
09/05/24 11:06:52.656 [5.61.122.206:31012 1 462] [Router] LSCWP_CTRL bypassed empty
09/05/24 11:06:52.883 [5.61.122.206:31012 1 462] [Core] CHK html bypass: miss footer const
09/05/24 11:06:52.883 [5.61.122.206:31012 1 462] [Ctrl] not cacheable before ctrl finalize
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Router] get_role:
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Vary] role id: failed, guest
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Router] get_role:
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Vary] can_change_vary bypassed due to ajax call
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Vary] no custimzed vary
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] ?? X-LiteSpeed-Cache-Control: no-cache
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] ?? Cache-Control: no-cache, no-store, must-revalidate, max-age=0
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] ?? X-LiteSpeed-Purge: public,*
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Router] get_role:
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Vary] role id: failed, guest
09/05/24 11:06:52.884 [5.61.122.206:31012 1 462] [Router] get_role:
09/05/24 11:06:52.885 [5.61.122.206:31012 1 462] [Core] CHK html bypass: miss footer const
09/05/24 11:06:52.885 [5.61.122.206:31012 1 462] [Core] run hook litespeed_buffer_finalize
09/05/24 11:06:52.885 [5.61.122.206:31012 1 462] [Core] Silence Comment due to REST/AJAX
09/05/24 11:06:52.885 [5.61.122.206:31012 1 462] Response headers --- array (
0 => 'X-Powered-By: PHP/8.2.22',
1 => 'X-Content-Type-Options: nosniff',
2 => 'Expires: Wed, 11 Jan 1984 05:00:00 GMT',
3 => 'Referrer-Policy: strict-origin-when-cross-origin',
4 => 'X-Frame-Options: SAMEORIGIN',
5 => 'X-Robots-Tag: noindex, follow',
6 => 'Content-Type: text/javascript; charset=utf-8',
7 => 'ETag: "cf34187e135689f920c80ff6e0804799"',
8 => 'X-LiteSpeed-Cache-Control: no-cache',
9 => 'Cache-Control: no-cache, no-store, must-revalidate, max-age=0',
10 => 'X-LiteSpeed-Purge: public,*',
)
09/05/24 11:06:52.885 [5.61.122.206:31012 1 462] End response09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] ?? ------GET HTTP/1.1 (HTTPS) /wp-admin/admin-ajax.php
09/05/24 11:06:50.143 [5.61.122.206:31012 1 462] Query String: action=wp_service_workerthis doesn’t look like normal update , I was expecting things like
update.php
orwp-cron.php
, were you using some kind of PWA ?Thanks, @qtwrk.
Yes, on this website I do use PWA. But on another website on this server, I don’t use PWA, and a plugin update on that website also triggers a cross-server purge.
may I know which PWA that is? I will set up a test site and check around a bit , and meanwhile , please also share me the log on other site where doesn’t use PWA
- This reply was modified 2 months, 2 weeks ago by qtwrk.
Thanks, @qtwrk.
This is the PWA plugin:
PWA – WordPress plugin | www.remarpro.com
This is the log from the other website:
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] ?? ------POST HTTP/1.1 (HTTPS) /wp-admin/admin-ajax.php
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] Query String:
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] HTTP_REFERER: https://koritsu.biz/wp-admin/update.php?action=update...
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit...
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] Accept: */*
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] Accept Encoding: gzip, br
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] Cookie _lscache_vary: 7b1969a61abb7c6ea1005884e034d5bf
09/06/24 11:32:33.628 [5.61.122.206:35202 1 hmV] X-LSCACHE: true
09/06/24 11:32:33.629 [5.61.122.206:35202 1 hmV] [Data] Checking table url
09/06/24 11:32:33.629 [5.61.122.206:35202 1 hmV] [Data] Existed
09/06/24 11:32:33.629 [5.61.122.206:35202 1 hmV] [Data] Checking table url_file
09/06/24 11:32:33.629 [5.61.122.206:35202 1 hmV] [Data] Existed
09/06/24 11:32:33.630 [5.61.122.206:35202 1 hmV] ??? [Activation] update_files
09/06/24 11:32:33.635 [5.61.122.206:35202 1 hmV] [Rules] Update frontend rules
09/06/24 11:32:33.637 [5.61.122.206:35202 1 hmV] [Data] Updated version to 6.5.0.1
09/06/24 11:32:33.640 [5.61.122.206:35202 1 hmV] ?? added * => LiteSpeed\Root::debug(?? added *,8)@51 => LiteSpeed\Purge->_add(ARRAY)@501 => LiteSpeed\Purge->_purge_all_lscache()@231 => LiteSpeed\Purge->_purge_all()@195 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145 => LiteSpeed\Conf->_conf_db_init()@107 => LiteSpeed\Conf->init()@36 => LiteSpeed\LSC->__construct()@50
09/06/24 11:32:33.642 [5.61.122.206:35202 1 hmV] ?? X-LiteSpeed-Purge: public,*
09/06/24 11:32:33.648 [5.61.122.206:35202 1 hmV] ?? added _MIN => LiteSpeed\Root::debug(?? added _MIN,8)@51 => LiteSpeed\Purge->_add(ARRAY)@501 => LiteSpeed\Purge->_purge_all_cssjs()@373 => LiteSpeed\Purge->_purge_all()@196 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145 => LiteSpeed\Conf->_conf_db_init()@107 => LiteSpeed\Conf->init()@36 => LiteSpeed\LSC->__construct()@50
09/06/24 11:32:33.648 [5.61.122.206:35202 1 hmV] ?? X-LiteSpeed-Purge: public,*
09/06/24 11:32:33.652 [5.61.122.206:35202 1 hmV] ?? added _LOCALRES => LiteSpeed\Root::debug(?? added _LOCALRES,8)@51 => LiteSpeed\Purge->_add(ARRAY)@501 => LiteSpeed\Purge->_purge_all_localres()@347 => LiteSpeed\Purge->_purge_all()@197 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145 => LiteSpeed\Conf->_conf_db_init()@107 => LiteSpeed\Conf->init()@36 => LiteSpeed\LSC->__construct()@50
09/06/24 11:32:33.652 [5.61.122.206:35202 1 hmV] ?? X-LiteSpeed-Purge: public,*
09/06/24 11:32:33.652 [5.61.122.206:35202 1 hmV] ?? Failed to flush object cache due to object cache not enabled
09/06/24 11:32:33.652 [5.61.122.206:35202 1 hmV] ?? Reset opcode cache
09/06/24 11:32:33.652 [5.61.122.206:35202 1 hmV] ?? Purge all => LiteSpeed\Root::debug(?? Purge all ,3)@51 => LiteSpeed\Purge->_purge_all()@212 => LiteSpeed\Purge::purge_all()@178 => LiteSpeed\Data->conf_upgrade(6.4.1)@145
09/06/24 11:32:33.664 [5.61.122.206:35202 1 hmV] ?? posting to : https://wpapi.quic.cloud/ver_check
09/06/24 11:32:34.052 [5.61.122.206:35202 1 hmV] ?? response ok --- array (
'dev' => '6.4.1',
'latest' => '6.4.1',
)
09/06/24 11:32:34.054 [5.61.122.206:35202 1 hmV] ?? posting to : https://wpapi.quic.cloud/ver_check
09/06/24 11:32:34.439 [5.61.122.206:35202 1 hmV] ?? response ok --- array (
'dev' => '6.4.1',
'latest' => '6.4.1',
)
09/06/24 11:32:34.439 [5.61.122.206:35202 1 hmV] [Data] Checking table url
09/06/24 11:32:34.439 [5.61.122.206:35202 1 hmV] [Data] Existed
09/06/24 11:32:34.439 [5.61.122.206:35202 1 hmV] [Data] Checking table url_file
09/06/24 11:32:34.439 [5.61.122.206:35202 1 hmV] [Data] Existed
09/06/24 11:32:34.439 [5.61.122.206:35202 1 hmV] ??? [Activation] update_files
09/06/24 11:32:34.440 [5.61.122.206:35202 1 hmV] [Cloudflare] _cloudflare_call [URL] https://api.cloudflare.com/client/v4/zones?status=active&match=all&name=koritsu.biz
09/06/24 11:32:35.890 [5.61.122.206:35202 1 hmV] [Cloudflare] _cloudflare_call called successfully
09/06/24 11:32:35.890 [5.61.122.206:35202 1 hmV] [Cloudflare] fetch_zone exact matched
09/06/24 11:32:35.891 [5.61.122.206:35202 1 hmV] [Cloudflare] Get zone successfully [ID] e83fd2898b211beae8f3ebe8240c05e6
09/06/24 11:32:36.241 [5.61.122.206:35202 1 hmV] [Ctrl] X Cache_control -> no Cache ( logged in user ) => LiteSpeed\Control::set_nocache(( logged in user ))@409 => LiteSpeed\Vary->after_user_init()@92 => LiteSpeed\LSC->after_user_init()@255 => WP_Hook->apply_filters(ARRAY)@324 => WP_Hook->do_action(ARRAY)@348 =>
/home/asafdevc/public_html/wp-settings.php@517
09/06/24 11:32:36.243 [5.61.122.206:35202 1 hmV] [Media] init
09/06/24 11:32:36.244 [5.61.122.206:35202 1 hmV] [LQIP] init
09/06/24 11:32:36.245 [5.61.122.206:35202 1 hmV] [CDN] init
09/06/24 11:32:36.245 [5.61.122.206:35202 1 hmV] [Router] CDN bypassed: ajax call from admin
09/06/24 11:32:36.245 [5.61.122.206:35202 1 hmV] ? Init
09/06/24 11:32:36.245 [5.61.122.206:35202 1 hmV] [Router] LSCWP_CTRL bypassed empty
09/06/24 11:32:36.360 [5.61.122.206:35202 1 hmV] [Core] CHK html bypass: miss footer const
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] [Ctrl] not cacheable before ctrl finalize
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] [Router] get_role: administrator
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] [Vary] role in vary_group [group] 99
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] [Vary] show_admin_bar_front: true
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] [Vary] admin bar : true
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] [Vary] can_change_vary bypassed due to ajax call
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] [Vary] no custimzed vary
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] ?? X-LiteSpeed-Cache-Control: no-cache
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] ?? Cache-Control: no-cache, no-store, must-revalidate, max-age=0
09/06/24 11:32:36.361 [5.61.122.206:35202 1 hmV] ?? X-LiteSpeed-Purge: public,*
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] [Vary] uid: 1
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] [Vary] role in vary_group [group] 99
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] [Vary] show_admin_bar_front: true
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] [Vary] admin bar : true
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] [Core] CHK html bypass: miss footer const
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] [Core] run hook litespeed_buffer_finalize
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] [Core] Silence Comment due to REST/AJAX
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] Response headers --- array (
0 => 'X-Powered-By: PHP/8.2.22',
1 => 'Access-Control-Allow-Origin: https://koritsu.biz',
2 => 'Access-Control-Allow-Credentials: true',
3 => 'Content-Type: text/html; charset=UTF-8',
4 => 'X-Robots-Tag: noindex',
5 => 'X-Content-Type-Options: nosniff',
6 => 'Expires: Wed, 11 Jan 1984 05:00:00 GMT',
7 => 'Referrer-Policy: strict-origin-when-cross-origin',
8 => 'X-Frame-Options: SAMEORIGIN',
9 => 'Connection: close',
10 => 'Content-Length: 17',
11 => 'X-LiteSpeed-Cache-Control: no-cache',
12 => 'Cache-Control: no-cache, no-store, must-revalidate, max-age=0',
13 => 'X-LiteSpeed-Purge: public,*',
)
09/06/24 11:32:36.362 [5.61.122.206:35202 1 hmV] End responseWere you able to replicate it with test sites?
Thanks again.
!defined('LSWCP_EMPTYCACHE') && define('LSWCP_EMPTYCACHE', true); // clear all sites caches
Purge::purge_all();in your upgrade I can see this was trigger, not sure why it has to do it this way , will consult with our devs
- You must be logged in to reply to this topic.