WordPress LiteSpeed Cache version 1.0.7 not caching.

#1
We have been using the WordPress plugin without issue, from beta through to version 1.0.6.

Version 1.0.7 is not caching. If we reinstall 1.0.6, then caching works without issue.

We have tested this on multiple servers, same issue.

We have also downloaded 1.0.7 & installed, vs. the update option, same issue.

We're using litespeed 5.0.17

Please advise on what we can provide you to help troubleshoot this issue.
 

KevinFwu

Administrator
Staff member
#2
Hi,

1. How are you testing the cache? I'm assuming you are testing via a logged out browser?
2. Are you using either WP Polls or WP Touch? We just added support for those two plugins in the release, so it may have been affected.
3. To test if the page is caching correctly:
a. In the plugin settings in debug, turn debug level to debug and save.
b. In an incognito browser, right click and "inspect".
c. Visit the page and check the "network" tab in the inspect bar.
d. There should be a row for each request made. We're interested in the first one.
e. After clicking it, check the response headers.It should say something like:
X-LiteSpeed-Cache-Control: public,max-age=1800
X-LiteSpeed-Tag: F,B.1
If it does not, we will need to investigate further as to why it's no longer caching.
 
#3
1. We're using the exact method you mention to test. Again, we're testing 1.0.6 works, then 1.0.7 doesn't work. Same server, same site, just different plugin versions.

2. No, the sites do not use WP Polls or WP Touch

Here is the response header from a test site using 1.0.7


server:LiteSpeed
status:200
vary:Accept-Encoding
x-litespeed-cache-control:no-cache
x-powered-by:pHP/5.6.21

================================

Here is the response header from another site using 1.0.6

Server:LiteSpeed
Vary:Accept-Encoding
X-Litespeed-Cache:hit
X-Powered-By:pHP/5.6.21

============================

Again, same server, just different plugin version
 

KevinFwu

Administrator
Staff member
#4
Please set debug level to debug again and enable debugging and debug logging in wordpress. When you visit a page correctly, it should say something like "no cache for ___" and give a reason. If it does not, then you may have accessed it in an unexpected manner.

Also, do you have any litespeed/cache rules set up in your .htaccess file?
 
#5
Here is .htaccess

<IfModule LiteSpeed>
RewriteEngine on
</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

========================

With debugging enabled in WordPress, it still doesn't give a reason for the no cache in the header response. However, here are some lines from the debug log

[25-May-2016 21:15:31 UTC] PHP Notice: Undefined index: lscwp_management in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/admin/class-litespeed-cache-admin.php on line 470
[25-May-2016 21:15:42 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:15:54 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:16:02 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:16:15 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:16:22 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:16:32 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:16:42 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:16:48 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
[25-May-2016 21:16:53 UTC] PHP Notice: Undefined index: LSCWP_CTRL in /home/wpc800/public_html/wp-content/plugins/litespeed-cache/includes/class-litespeed-cache.php on line 1070
 

KevinFwu

Administrator
Staff member
#6
I won't be able to look at this again until tomorrow morning, but could you enable debug logging on the server and try accessing the pages again and pm me the error log? I'll see tomorrow if there's something going on that the server can tell me.

For now, after creating the log, turn off the debug logging and revert to 1.0.6.

Sorry I wasn't able to fix this today, hopefully it'll be quick work tomorrow.

Kevin
 
#7
Kevin,

We appreciate your help. I think it's a bug in the version 1.0.7 plugin. We were able to replicate the issue on two servers, two different sites.

If the plugin is installed using the default settings, then it caches without issue.

However, if you go into the plugin settings ---> Purge Rules

Then select the "All pages" box, the site will stop caching.

We can then go back, unselect that box, the site will start caching again.

Are you able to replicate this & confirm it's a bug?
 

KevinFwu

Administrator
Staff member
#8
I just tested it and am able to confirm that this is happening. Thanks for finding it! After finding the reason for this, we'll update you asap.
 
Top