LiteSpeed Cache - Community

LiteSpeed Cache - Community 1.0.4.3

No permission to download
@allewreK The reason you cannot use that rewrite rule (and you should also turn Enable Public Cache back to not set) is because when it is 'on', the server will cache every request. This is incorrect behavior, as the XF plugin should tell the server what is cacheable and what is not (as an example, XF control panel - this was cached because of setting 'Enable Public Cache' to On).

When both are off, you mentioned that the cache was always missing. Is it possible that the site was very active at the time? If so, when someone posts a new reply, the front page will get purged. When I visited your site, I noticed that your TTL was set to 190 seconds. A short TTL is not needed as we should be clearing the cache every time someone makes an updated post anyway.

Let me know if this is still confusing,
Kevin

Oh ok, didn't guess that the XenForo addon was doing all of this. That's amazing.

It look's working now.

But I am NEVER able to hit the cache, even in maintenance mode (so no active user). I always get the "miss" cached mention.
But ... when I look the Litespeed CP, there are some users hitting the cache... So I guess it is working ^^

One question : if I have a specific thread (let's say ID 1). If a new thread is posted (ID 2), will the first thread remain in cache ?
 
No my bad @lsKevin, it's not working :
  • Total Public Cache Hits 0
  • Total Private Cache Hits 0
Code:
RewriteEngine On
RewriteRule .* - [E="cache-vary:skipPageCache,rg_language_id"]
 
Regarding your question, yes, it should. Only related pages (e.g. if a reply is made, the thread, forum, forum list) should be purged.

Regarding your test, it may have something to do with appearing as logged in. If you visit your site in an incognito window, perhaps you will see a cache hit?
 
CacheLookup Public On is required to look up from the cache.

The CacheEnable rule should not be there, as that one causes issues.

Thanks you very much for the support @lsKevin, everything is working as excepted now.
And that's more powerfull than I imagined : that remain in cache as soon as the content does not changed.

Congratz for this addon exploiting the full features of LiteSpeed web server.
 
John,

There are two possibilities that I am aware of that may cause this issue:
1. What version of the server are you using? An older version of the server may not include the quotation processing or passing it back to XF.
2. I see a RewriteBase in your rewrite rules. Does this mean that this .htaccess file is outside the xf installation? e.g. the htaccess is in /public_html/.htaccess, XF is installed in /public_html/kamal/.

Are either of these the issue?
 
John,

There are two possibilities that I am aware of that may cause this issue:
1. What version of the server are you using? An older version of the server may not include the quotation processing or passing it back to XF.
2. I see a RewriteBase in your rewrite rules. Does this mean that this .htaccess file is outside the xf installation? e.g. the htaccess is in /public_html/.htaccess, XF is installed in /public_html/kamal/.

Are either of these the issue?

i removed the rewrite base as the directory doesn't even exist. my xenforo is installed in /public_html/ and the htaccess is there as well. It didn't work after I removed the rewrite base.

server is on CENTOS 6.8
 
Please upgrade to 5.1.9. Hopefully that will fix the issue. In the meantime, I will look into the code to see why this is happening to see if it's not server related.
 
I've upgraded. same issue

IMPORTANT: Verification has determined that your cache vary rewrite rule may be incorrect. Verification checks your settings against this rewrite rule for the possibility of language vary, theme vary, and login cookie vary. To match your settings, your cache vary rewrite rule should include at least the following.


### LSCACHE START LOGIN COOKIE ###
RewriteRule .* - [E="cache-vary:xf_style_id"]
### LSCACHE END LOGIN COOKIE ###
 
If you are comfortable with editing files, please add the following line to
Code:
library/Litespeedcache/ControllerAdmin/Manage.php

Inside the function verifySetup() just before the "$styles =" line, add the following line:
Code:
error_log('check server vars ' . $serverVary);

Then try verifying again. In your error log, you should see something that says check server vars and something after it. Let me know what it says.

I will be out of the office until tomorrow morning, but hopefully we'll get more information from this.
 
here's the error

ErrorException: Array to string conversion - library/Litespeedcache/ControllerAdmin/Manage.php:71
Stack Trace
#0 /home/ga/public_html/library/Litespeedcache/ControllerAdmin/Manage.php(71): XenForo_Application::handlePhpError(8, 'Array to string...', '/home/ga/...', 71, Array)
#1 /home/ga/public_html/library/Litespeedcache/ControllerAdmin/Manage.php(129): Litespeedcache_ControllerAdmin_Manage->verifySetup(Array)
#2 /home/ga/public_html/library/Litespeedcache/ControllerAdmin/Manage.php(41): Litespeedcache_ControllerAdmin_Manage->parseActions(Array)
#3 /home/ga/public_html/library/XenForo/FrontController.php(351): Litespeedcache_ControllerAdmin_Manage->actionActions()
#4 /home/ga/public_html/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#5 /home/ga/public_html/admin.php(13): XenForo_FrontController->run()
#6 {main}
Request State
array(3) {
["url"] => string(52) "https://www.ga.net/admin.php?lscache/actions"
["_GET"] => array(1) {
["lscache/actions"] => string(0) ""
}
["_POST"] => array(5) {
["_xfToken"] => string(8) "********"
["lscache_action_submit"] => string(12) "Verify Setup"
["_xfRequestUri"] => string(19) "/admin.php?lscache/"
["_xfNoRedirect"] => string(1) "1"
["_xfResponseType"] => string(4) "json"
}
}
 
@John Blaze Apologies, forgot a part. Please add this line instead:
Code:
error_log('check server vars ' . print_r($serverVary, true));

@allewreK Could you please pm me temporary credentials to try to log in to your site? I'd like to see what is getting cached that causes this issue.
 
Back
Top Bottom