This is an old revision of the document!
LSCache Plugin for XenForo 2
LSCache for XenForo 2 is a plugin developed specifically for XenForo 2.x. If you are running XenForo 1.x, please use LSCache for XenForo 1.
Features
- Powerful defense against DDOS attacks.
- Significantly reduce server load (and MySQL queries).
- Guests pages are cached by LiteSpeed cache.
Installation
- Disable any other page caches as these will interfere with LSCXF2.
- Access the server hosting your XenForo installation, either directly or using ssh/sftp.
- From the unzipped LSCXF2 folder, copy all files under upload to the upload folder of your XenForo installation.
- In the XenForo control panel, navigate to the Add-ons section to complete the installation.
Configuration
Edit .htaccess
with the code shown below, making the following changes where appropriate:
- Replace
xf_user
with the new value, if you changed it in XenForo Configuration. - If you want to cache for more or less than 360 seconds, change
360
to the number of seconds you wish. (Recommended < 10 minutes):
# LiteSpeed XenForo cache <IfModule litespeed> RewriteEngine On # cache RewriteCond %{HTTP_COOKIE} !xf_user [NC] RewriteRule .* - [E=Cache-Control:max-age=360] # no cache RewriteCond %{HTTP_COOKIE} xf_user [NC] RewriteRule .* - [E=Cache-Control:no-cache] </IfModule>