Disabling cache in LSCache plugin does not clear cache
-
I struggled with my blog’s cache – or LS Cache for a few days.
Yesterday I disabled the cache in the LS Cache plugin, so I no longer had the HIT tag in the logs for the home page and the next few pages with entries.
But it turned out that it was not enough for the home page and the next subpages with entries to look as they should, i.e. to be up to date, including the latest entry.Even removing these overlapping texts from the home page design didn’t help.
On both computers and smartphones, some old version of the page kept downloading.
This morning I decided to disable the LS Cache plugin altogether, which finally proved effective, so that pages would load from WordPress, and not from some cache. Now I have a correct view on all devices: computers and smartphones in many different browsers.
What’s more, the performance without LS Cache is at a similar level as with LS Cache.Where is the problem with LS Cache, that despite disabling its cache, pages continue to load from it, and only after completely disabling the plugin is this cache effectively disabled?
And I think I see where the problem lies. In yesterday’s copy of htaccess after disabling the cache in LS Cache there are these entries:
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule litespeed/debug/.*\.log$ - [F,L]
RewriteRule \.litespeed_conf\.dat - [F,L]
### marker ASYNC start ###
RewriteCond %{REQUEST_URI} /wp-admin/admin-ajax\.php
RewriteCond %{QUERY_STRING} action=async_litespeed
RewriteRule .* - [E=noabort:1]
### marker ASYNC end ###
### marker MOBILE start ###
RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+ismobile]
### marker MOBILE end ###
### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker DROPQS start ###
CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga
### marker DROPQS end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###After disabling the LSCache plugin today, htaccess looks like this:
#BEGIN LSCACHE
#END LSCACHE
#BEGIN NON_LSCACHE
#END NON_LSCACHE
So disabling the cache in LS Cache does not make the necessary changes to htaccess, hence you still see some old versions of blog pages on computers and mobile devices.I have an older complete version of htaccess with LS Cache working:
# BEGIN LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
<IfModule LiteSpeed>
RewriteEngine on
CacheLookup on
RewriteRule .* - [E=Cache-Control:no-autoflush]
RewriteRule litespeed/debug/.*\.log$ - [F,L]
RewriteRule \.litespeed_conf\.dat - [F,L]
### marker ASYNC start ###
RewriteCond %{REQUEST_URI} /wp-admin/admin-ajax\.php
RewriteCond %{QUERY_STRING} action=async_litespeed
RewriteRule .* - [E=noabort:1]
### marker ASYNC end ###
### marker MOBILE start ###
RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+ismobile]
### marker MOBILE end ###
### marker CACHE RESOURCE start ###
RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
### marker CACHE RESOURCE end ###
### marker DROPQS start ###
CacheKeyModify -qs:fbclid
CacheKeyModify -qs:gclid
CacheKeyModify -qs:utm*
CacheKeyModify -qs:_ga
### marker DROPQS end ###
</IfModule>
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END LSCACHE
# BEGIN NON_LSCACHE
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
### marker BROWSER CACHE start ###
<IfModule mod_expires.c>
ExpiresActive on
ExpiresByType application/pdf A315576
ExpiresByType image/x-icon A315576
ExpiresByType image/vnd.microsoft.icon A315576
ExpiresByType image/svg+xml A315576
ExpiresByType image/jpg A315576
ExpiresByType image/jpeg A315576
ExpiresByType image/png A315576
ExpiresByType image/gif A315576
ExpiresByType image/webp A315576
ExpiresByType video/ogg A315576
ExpiresByType audio/ogg A315576
ExpiresByType video/mp4 A315576
ExpiresByType video/webm A315576
ExpiresByType text/css A315576
ExpiresByType text/javascript A315576
ExpiresByType application/javascript A315576
ExpiresByType application/x-javascript A315576
ExpiresByType application/x-font-ttf A315576
ExpiresByType application/x-font-woff A315576
ExpiresByType application/font-woff A315576
ExpiresByType application/font-woff2 A315576
ExpiresByType application/vnd.ms-fontobject A315576
ExpiresByType font/ttf A315576
ExpiresByType font/otf A315576
ExpiresByType font/woff A315576
ExpiresByType font/woff2 A315576
</IfModule>
### marker BROWSER CACHE end ###
## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
# END NON_LSCACHEHere you can see the differences between having LS Cache fully enabled, only having the cache disabled in the plugin, and having the plugin disabled altogether.
The mechanism of this plugin is currently not trustworthy and does not provide any significant improvement in the performance/speed of the pages.
Moreover, minify options for JS and CSS do not work, similarly minify for HTML.
I had to manually minify several JS and CSS scripts in the plugin: CookieYes | GDPR Cookie Consent
because LS Cache does not do it, and another plugin Rank Math indicated a lack of minify in JS and CSS in this plugin.The page I need help with: [log in to see the link]
- The topic ‘Disabling cache in LSCache plugin does not clear cache’ is closed to new replies.