LiteSpeed Cache for XF2 - Community

LiteSpeed Cache for XF2 - Community 2.3.0

No permission to download

Michael A.

Well-known member
Michael A. submitted a new resource:

LiteSpeed Cache - Community - Quickly and easily implement high-performance page caching on your XenForo forum

Developed by LiteSpeed Technologies - the LiteSpeed Cache Plugin for XenForo 2 (LSCXF2) is a PHP-based plugin that communicates with your installation of LiteSpeed Web Server(LSWS) and its built-in page cache, LSCache. Because LSCache is built directly into LSWS, overhead is significantly reduced and caching can be done more efficiently than with other PHP-based caches.

The current community version of LSCXF2 will only cache and serve pages for non-logged in users. After a user has logged...

Read more about this resource...
 
As a XenForo developper and big board owner, I worked with the LiteSpeed team to make this addon available to the XenForo customers.

I have been using it for a month at my board realitygaming.fr, and LSCache for XenForo 2 is a must have addon when you own a XenForo forum with LiteSpeed : it's reducing server load and can even reduce the impact of L7 DDOS attacks.
 
There are bugs with this plugin. Like this one:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
Last edited:
And there is this line in my .htaccess. SHould I delete it?

Code:
### LSCACHE START LOGIN COOKIE ###
RewriteRule .* - [E="cache-vary:xf_style_id,xf_language_id,_my_xenforo_vary"]
### LSCACHE END LOGIN COOKIE ###
 
My cookie prefix is xf_

Should I change the .htaccess? Because your readme has xf_user.

If your cookie prefix is xf_ that should be okay. The {$prefix}_user cookie should get created during login.

If you are using a custom cookie prefix through
PHP:
<?php

$config['cookie']['prefix'] = 'custom_prefix_';

Then you would need to use this custom prefix value instead.

And there is this line in my .htaccess. SHould I delete it?

Code:
### LSCACHE START LOGIN COOKIE ###
RewriteRule .* - [E="cache-vary:xf_style_id,xf_language_id,_my_xenforo_vary"]
### LSCACHE END LOGIN COOKIE ###

Assuming that you are using multiple styles, languages, and lscache plugins on the same server, yes keep these rules as well to make sure that the public cache stores different cached copies depending on the vary values.
 
Disabled. This problem is still there:

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.
 
I bought an hourly support from you guys and Jonathan enabled OPCache for PHP on the server. Could this be the problem?
 
The last video had very interesting music, and I thought it explained your issue thoroughly. However, even with 1.0.2 and new htaccess rules, I am still seeing a problem when people are logged out and try to login with "Oops. Something went wrong. blah blah blah". Off for now.
 
I'm interested in this, and I'm using Litespeed, but based on the description where it says "will only cache and serve pages for non-logged in users" - does that mean this addon will make no difference to my forum, if my forum always requires login (no publicly accessible pages at all)?
 
@sandnes You are correct. This version of the plugin will only cache guests (not logged in), so it will not be of any benefit on the forum described.

We plan to add caching for logged in users in the future, but this is currently low priority with no ETA.

Regards,
-Michael
 
Installed this plug in and it caches ok but I get security error messages when logging in, particularly on the index page of the forum.

Cookie prefix is xf_ and I added exactly what it tells you to add to the .htaccess in the installation instructions.

I have had to disable caching for now until I can resolve this issue so the add on is pretty useless to me at the moment.

Anybody any idea on how to resolve this?
 
Installed this plug in and it caches ok but I get security error messages when logging in, particularly on the index page of the forum.

Cookie prefix is xf_ and I added exactly what it tells you to add to the .htaccess in the installation instructions.

I have had to disable caching for now until I can resolve this issue so the add on is pretty useless to me at the moment.

Anybody any idea on how to resolve this?

Hello @Wayne T1 ,

Sorry for the late initial response! I've reproduced your problem on our end and think that we have fixed it.

We are currently testing the fix on our live forum and I should be putting out a new plugin version this afternoon (EST) if all goes well.

Regards,
-Michael
 
Hello @Wayne T1 ,

Sorry for the late initial response! I've reproduced your problem on our end and think that we have fixed it.

We are currently testing the fix on our live forum and I should be putting out a new plugin version this afternoon (EST) if all goes well.

Regards,
-Michael

Hopefully you can get it fixed and working, it is the way that Xenforo implements CSRF that's the problem I think.
 
Hopefully you can get it fixed and working, it is the way that Xenforo implements CSRF that's the problem I think.
Right. They save the csrf validation info directly into the served pages HTML in a script tag. This creates the security error your seeing when user X caches the page and then user Y tries to log in/register (effectively with user X's csrf info). We are going to bypass the csrf validation for guests users on those two requests for the time being.

I should be uploading v2.1.0 very soon :)

Regards,
-Michael
 
Back
Top Bottom