LiteSpeed Cache for XF2 - Community

LiteSpeed Cache for XF2 - Community 2.2.1

No permission to download

Michael A.

Active 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...
 

Jean-Baptiste

Well-known member
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.
 

Recep Baltaş

Well-known member
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 ###
 

Michael A.

Active member
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.
 

Recep Baltaş

Well-known member
I bought an hourly support from you guys and Jonathan enabled OPCache for PHP on the server. Could this be the problem?
 

Mike Fara

Active member
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.
 

sandnes

Member
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)?
 

Michael A.

Active member
@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
 

Wayne T1

New member
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?
 

Michael A.

Active member
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
 

Wayne T1

New member
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.
 

Michael A.

Active member
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
 
Top