LiteSpeed Cache for XF2 - Community

LiteSpeed Cache for XF2 - Community 2.3.0

No permission to download
@Wayne T1 It looks like I should have read your review a little more carefully. I'll be posting a v2.1.1 in a bit to also address this happening when a guest attempts to search from a cached page.
 
For those upgrading to this new version, please also update your related .htaccess rules to the following:

Code:
# LiteSpeed XenForo cache
  <IfModule litespeed>
      CacheLookup public on
      RewriteEngine On
       # cache
       RewriteCond %{HTTP_COOKIE} !(xf_user|xf_session_admin) [NC]
       RewriteRule .* - [E=Cache-Control:max-age=360]
       # no cache
       RewriteCond %{HTTP_COOKIE} (xf_user|xf_session_admin) [NC]
       RewriteRule .* - [E=Cache-Control:vary=loggedin,E=Cache-Control:no-cache]
  </IfModule>
 
Last edited:
I am using the Digital Ocean Spaces plugin which stores attachments at Digital Ocean. Is there a benefit to this plugin for mt setup?

Thanks
 
I am using the Digital Ocean Spaces plugin which stores attachments at Digital Ocean. Is there a benefit to this plugin for mt setup?

Thanks
Hello @BrianC,

The Spaces plugin shouldn't factor into this at all. In our plugins current state, it will cache the completed HTML page for guests as a static page on initial visit. This has the benefit of avoiding heavy PHP calls on any subsequent visits while the page is still cached, saving server resources and serving the page to your visitors much faster.

Regards,
-Michael
 
Hey guys,

I've recently updated our recommended plugin .htaccess rules to include varying on XenForo's xf_style_id and xf_language_id cookies. The updated rules are included below:

Code:
# LiteSpeed XenForo cache
<IfModule litespeed>
    CacheLookup public on
    RewriteEngine On
     # cache
     RewriteCond %{HTTP_COOKIE} !xf_user [NC]
     RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]
     # no cache
     RewriteCond %{HTTP_COOKIE} xf_user [NC]
     RewriteRule .* - [E=Cache-Control:vary=loggedin]
     RewriteCond %{HTTP_COOKIE} xf_user [NC]
     RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>

Regards,
-Michael
 
Hey guys,

I've recently updated our recommended plugin .htaccess rules to include varying on XenForo's xf_style_id and xf_language_id cookies. The updated rules are included below:

Code:
# LiteSpeed XenForo cache
<IfModule litespeed>
    CacheLookup public on
    RewriteEngine On
     # cache
     RewriteCond %{HTTP_COOKIE} !xf_user [NC]
     RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]
     # no cache
     RewriteCond %{HTTP_COOKIE} xf_user [NC]
     RewriteRule .* - [E=Cache-Control:vary=loggedin]
     RewriteCond %{HTTP_COOKIE} xf_user [NC]
     RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>

Regards,
-Michael

Where do we put it? Forum root or server root (www)?
 
Does this replace the 2.1 native guest caching or do you use this with it just naming it as a provider?
 
Does this replace the 2.1 native guest caching or do you use this with it just naming it as a provider?
Hi @dethfire ,

This plugin does not do anything to replace native guest caching, which should continue to operate as normal.

What this plugin does do is work with the server to provide a server level cache, meaning that the page would be served from cache by the server without hitting any PHP (including XenForo's native guest cache). As such it should serve your guest pages faster while using less resources than native guest caching alone.

Regards,
-Michael
 
What this plugin does do is work with the server to provide a server level cache, meaning that the page would be served from cache by the server without hitting any PHP (including XenForo's native guest cache). As such it should serve your guest pages faster while using less resources than native guest caching alone.
Thanks for the reply Michael, sorry I am a bit daft. From my understanding the new 2.1 guest page caching requires a provider like Memcached, Redis or file system. So are you saying LiteSpeed Cache is not redundant with those? So for example if I am naming Memcached as the provider for my guest page caching then I can also install this and they all work together? Thanks!!
 
Thanks for the reply Michael, sorry I am a bit daft. From my understanding the new 2.1 guest page caching requires a provider like Memcached, Redis or file system. So are you saying LiteSpeed Cache is not redundant with those? So for example if I am naming Memcached as the provider for my guest page caching then I can also install this and they all work together? Thanks!!

No problem, it isn't the clearest thing :) .

Basically, they are redundant as far as page caching goes, as only one of them can serve the cached page back to the visitor.

What I meant to get across is that memcached/redis/etc being used as a page cache requires PHP to make that determination, so the cost of starting PHP to get to the cached file is "built-in" to every request.

For this plugin, you do not need to set it as the guest page cache in XenForo conf, as the determination to serve cached pages is done at the server level, before the request even reaches XenForo, thereby serving the cached page directly and bypassing the added cost of having to start PHP.

So while there is no need for XenForo's native guest caching while using this plugin with LiteSpeed Web Server, it shouldn't hurt things either. LiteSpeed Cache will serve the cached page before XenForo has the chance to to check and serve it's native cache in any case.

I hope this clears things up a bit.
 
I hope this clears things up a bit.
Interesting, yes I think I get it. I can continue to use something like Memcached/Redis for general object/DB caching, but don't configure the native guest page caching in XF, install this and it connects with the litespeed cache plugin at the server level? Do I have it? This requires install of the litespeed cache cpanel addon right?

Furthermore, I have a few wordpress sites on the server. If I install the cpanel litespeed plugin, I should be using the litespeed cache plugin instead of others like The Fastest Cache, right?
 
I can continue to use something like Memcached/Redis for general object/DB caching, but don't configure the native guest page caching in XF, install this and it connects with the litespeed cache plugin at the server level?
Correct

Do I have it?
All you or your hosting provider needs is to be runnig LiteSpeed Web Server with LSCache. LSCache is included in all of our newset license types so there is a good chance that running on LiteSpeed means your server also has access to the required LSCache module.

This requires install of the litespeed cache cpanel addon right?
Nope, that is not required and would be unrelated to our XenForo plugin in particular (Not so for WordPress, which I will get to in the next response).

If I install the cpanel litespeed plugin, I should be using the litespeed cache plugin instead of others like The Fastest Cache, right?

If you manage the server and use cPanel/WHM, downloading our WHM plugin is a great way to easily Install our LiteSpeed Cache for WordPress plugin across all your WordPress sites. (more info on that in our wiki) I would certainly recommend using LiteSpeed Cache for caching over other cache plugins when running on a LiteSpeed server for the aforementioned reason. Our WordPress plugin in particular also includes many other useful (and free) features, such as our popular image optimization service. You can find out more about our WordPress plugin here.

I hope this answers your questions and doesn't come off as too much of a "commercial" :p
 
The WHM plugin includes a "Cache Manager" feature that can be used to scan your server for any WordPress installations and install our LiteSpeed Cache for WordPress plugin on them. It's more of a convenience feature for Hosts with hundreds of installations. It would be a giant pain to have to log into those installations one by one to enable our WordPress plugin.
 
The WHM plugin includes a "Cache Manager" feature that can be used to scan your server for any WordPress installations and install our LiteSpeed Cache for WordPress plugin on them. It's more of a convenience feature for Hosts with hundreds of installations. It would be a giant pain to have to log into those installations one by one to enable our WordPress plugin.
Ok so to conclude, if I have a current version of litespeed with lscache, all I need is this addon to enable it with XF (lscache WHM is not required or enough?). To enable on my wordpress sites I either individually install the the plugin (with other enhancements) (WHM plugin not required, aka redundant then?) or I enable system wide via WHM lscache plugin, but then I don't get the extra optimization features as the individual wordpress plugin?
 
Close.

There are 3 parts
1) LSCache Module - This is part of LiteSpeed Web Server itself and is in charge of handling cache logic.

2) LSCache plugin/addon - This is the plugin/addon you would install on your CMS (such as XenForo or WordPress). This plugin/addon's job is to communicate what should be cached and when to the LSCache Module on the server. These plugins can also include other handy features, such as those mentioned for our LSCache Plugin for WordPress.

3) WHM plugin - This is our general plugin for WHM. It's main purpose is to allow you to manage LiteSpeed Web Server from the WHM dashboard. As such it contains features like changing LiteSpeed Web Server version, restarting the server, etc. One such feature is "Cache Management" which at the moment is only available for WordPress. This allows you to mass enable/disable our LSCache plugin for WordPress (see #2) on your WordPress installs with a few clicks, but is completely seperate from WordPress and the LSCache for WordPress plugin. Logging into your WordPress backend and installing the plugin manually has the same affect as enabling through our WHM plugin.

So in short, installing this plugin on your XF2 site should be all you need to do. For WordPress, you can do it manually or through our WHM plugin, the end result will be the same and any additional plugin features will be available no matter.
 
Top Bottom