Cache control doesn't seem to work

I’m using MainWP 4.2, cache control is enabled. I’m using LiteSpeed Cache on the child site.

So I updated a plugin, but when I go to Sites > Manage Sites I still see “Never Purged”. The Cache Solution is displayed as “LiteSpeed Cache”, so at least it recognizes the right caching solution.

I then looked at the website in an incognito mode window and it still displayed cached pages from yesterday. After manually purging the cache I get freshly cached pages.

Hi @peter-fb

Can you please post the community system report from your MainWP Dashboard for review? The report is located in your Dashboard under Status → Server, on the top right of the page.

Be sure to use the button like the one below; this button hides all your private information:

image

Pressing the button auto-copies the report to your clipboard then just paste it in a reply here.

Hi @bojan, sure:


### Server Info                    Required                                               Detected                                     Status   ###

MainWP Dashboard                   
MainWP Dashboard Version           4.2                                                    4.2                                          Pass        
MainWP Upload Directory            Writable                                               Writable                                     Pass        
MainWP Extensions                  
MainWP Clean and Lock Extension    4.0.1.2                                                API License Active                           Pass        
MainWP Domain Monitor Extension    4.0                                                    API License Active                           Pass        
WordPress                          
WordPress Version                  >=3.6                                                  5.9.3                                        Pass        
WordPress Memory Limit             >=64M                                                  40M                                          Warning     
MultiSite Disabled                 =true                                                  true                                         Pass        
FileSystem Method                  = direct                                               direct                                       Pass        
PHP                                
PHP Version                        >=7.0                                                  7.4.28                                       Pass        
PHP Safe Mode Disabled             =true                                                  true                                         Pass        
PHP Max Execution Time             >=30 seconds                                           180                                          Pass        
PHP Max Input Time                 >=30 seconds                                           -1                                           Pass        
PHP Memory Limit                   >=128M                                                 256M                                         Pass        
PCRE Backtracking Limit            >=10000                                                1000000                                      Pass        
PHP Upload Max Filesize            >=2M                                                   64M                                          Pass        
PHP Post Max Size                  >=2M                                                   64M                                          Pass        
SSL Extension Enabled              =true                                                  true                                         Pass        
SSL Warnings                       = empty                                                                                             Pass        
cURL Extension Enabled             =true                                                  true                                         Pass        
cURL Timeout                       >=300 seconds                                          60                                           Warning     
cURL Version                       >=7.18.1                                               7.71.0                                       Pass        
cURL SSL Version                   >=OpenSSL/1.1.0                                        OpenSSL/1.1.1d                               Pass        
PHP Allow URL fopen                YES                                                    
PHP Exif Support                   YES ( V7.4.)                                           
PHP IPTC Support                   YES                                                    
PHP XML Support                    YES                                                    
PHP Disabled Functions             No functions disabled.                                 
PHP Loaded Extensions              Core, PDO, Phar, Reflection, SPL, SimpleXML, bcmath, bz2, calendar, ctype, curl, date, dom, enchant, exif, fileinfo, filter, ftp, gd, gettext, gmp, hash, i360, iconv, imagick, imap, intl, json, ldap, libxml, litespeed, mbstring, mysqli, mysqlnd, openssl, pcntl, pcre, pdo_mysql, pdo_pgsql, pdo_sqlite, pgsql, posix, pspell, readline, session, shmop, soap, sockets, sqlite3, standard, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib
MySQL                              
MySQL Version                      >=5.0                                                  10.3.34-MariaDB-cll-lve                      Pass        
MySQL Mode                         ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
MySQL Client Encoding              utf8mb4                                                
Server Info                        
Server Software                    LiteSpeed                                              
Operating System                   Linux                                                  
Architecture                       64		 bit                                               
Server Protocol                    HTTP/1.1                                               
HTTPS                              ON                                                     
Server self connect                Response Test O.K.                                     
User Agent                         Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:98.0) Gecko/20100101 Firefox/98.0
Gateway Interface                                                                         
Memory Usage                       41.46 MB                                               
Request Time                       1649342798                                             
Accept Content                     text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8
Accept-Charset Content             N/A                                                    
MainWP Settings                    
Number Of Child Sites              4                                                      
Use WP-Cron                        No                                                     
Optimize for Shared Hosting or Big NetworksNo                                                     
Automatic Daily Update             Install trusted updates                                
Abandoned Plugins/Themes Tolerance 365                                                    
Maximum number of posts to return                                                         
Maximum number of pages to return                                                         
Primary Backup System              Default MainWP Backups                                 
Maximum simultaneous requests      4                                                      
Minimum delay between requests     200                                                    
Maximum simultaneous requests per ip1                                                      
Minimum delay between requests to the same ip1000                                                   
Maximum simultaneous sync requests                                                        
Maximum simultaneous install and update requests                                                       
Active Plugins                     
FluentSMTP                         2.1.1                                                  Active                                       
MainWP Child                       4.2                                                    Active                                       
MainWP Dashboard                   4.2                                                    Active                                       
WP Crontrol                        1.12.0                                                 Active                                       

I see that I forgot to adapt the settings where there is a warning (I made a note somewhere to do it :P). But I don’t think that these settings are the reason why it doesn’t work?

@peter-fb Thanks for the report - I will be going over this for you today on our LS Test Servers to see what could be the issue. Thank you very much for your patience while I look into things.

I will update this ticket as soon as I have some more details.

2 Likes

I just updated more than one plugin on this child site via MainWP, and now on Sites > Manage Sites it displays “April 7, 2022 3:24pm” (UTC) on Last Purged Cache.

But it doesn’t seem to have an effect:

I then visited some pages on this child website via curl -I https://example.com/page/ and I still get x-litespeed-cache: hit and in the page source I see that the page was generated a few hours ago, so it seems that the cache wasn’t purged.

1 Like

@peter-fb Can you please test this MainWP Child Plugin “version” and let me know if your cache finally clears for real. ( the actual version number will be 4.2.1 )

In order to test if it actually is you may follow this Doc:

1 Like

@kwcjr Thank you for that! I just wanted to ask, I see that you guys have a new version out, 4.2.1, should I still test this version here or is it already included in the 4.2.1 version?

@peter-fb no it won’t that was pushed today along side this test. This change will be included in 4.2.1+

I have quickly pulled in the 4.2.1 changes prior to making mine for this test

4.2.1 + my Fix Dropbox - File Deleted

Thanks again for testing! :slight_smile:

1 Like

@kwcjr I see.

I’ve installed your version, now I just have to wait for a plugin or theme update. :stuck_out_tongue:

1 Like

@peter-fb Use the wp rollback plugin. WP Rollback – WordPress plugin | WordPress.org

1 Like

@kwcjr I thought that there could be something like this, I’ll try it soon, thanks!

1 Like

@peter-fb Thanks! This fix will be push in a few hours. I am pretty sure it’s working now too as the page load was noticeably different along side visual testing with the returned headers.

1 Like

@kwcjr OK, I updated one plugin, and in MainWP it displays that the cache was purged at that time, but I still get this:

x-litespeed-cache: hit

And when I look at the page source it’s still the older cached version…

@peter-fb And you disabled your browser cache? You may need to do a manual purge from the plugin in order to load the new plugin code first…

1 Like

@kwcjr I used curl -I https://www.example.com in a Linux command line to look at it, and I used an incognito window to look at the page source. Do you mean purge LiteSpeed Cache in the WordPress installation?

@peter-fb yes can you also test my way instead of using curl please.

1 Like

@kwcjr OK, I purged LiteSpeed Cache manually, twice actually.

I tested it your way, it seems it still doesn’t work.

You can also see it in the page source:

Page generated by LiteSpeed Cache 4.6 on 2022-04-14 15:01:10

And in MainWP it displays that the cache was purged at 15:02 (I waited about a minute to update the plugin). So I should get a new generated page, but it still displays the old version.

Maybe I’m doing something wrong.

Would you mind opening a private Help Desk ticket so we can collect some additional information & investigate further? I will be the one responding.

1 Like

@peter-fb I have replied to this ticket from our Help Desk System - could you please respond from there instead thank you.

1 Like