LiteSpeed Cache for XF2 - Community

LiteSpeed Cache for XF2 - Community 2.3.0

No permission to download
Thanks for this addon.
I have small problem...

After installing this addon, members already logged in won't have xf_lscxf_logged_in cookie.
How can I enforce it for already logged members?
 
Last edited:
Thanks for this addon.
I have small problem...

After installing this addon, members already logged in won't have xf_lscxf_logged_in cookie.
How can I enforce it for already logged members?
But they have xf_user!
 
I've followed the steps to install litespeed: add-on installed, htaccess updated. But I can't workout from Chrome developer tools if it is working or not. Can someone help? Maybe its above my pay grade!
 
I've followed the steps to install litespeed: add-on installed, htaccess updated. But I can't workout from Chrome developer tools if it is working or not. Can someone help? Maybe its above my pay grade!
same problem
litespeed does not work
litespeed-tag headers : miss or hit does not exist
no-litespeed.webp


Pending specialist support : @Michael A.
 
How long ago did you install?

I have another potential issue and I am not sure if it is litespeed related or not. My Google Analytics shows traffic down for the day after I set up the cache on Xenforo. Have you noticed this?
 
I have recently been told that the Troubleshooting link is for XF1. I'm using XF2, but cannot see any troubleshooting link that applies.
 
Hi guys, sorry about not responding sooner, I stopped getting alerts for posts to this forum for whatever reason. 😅

For those having trouble getting the cache headers to show up (or caching to work in general), please check that the rules you added to the .htaccess file are at the top of the file, or at the least come before any rules containing the [L] flag. This flag will stop .htaccess processing and could prevent the cache plugin related rules from being run.

@rdn Are you still running into issues with this?
 
Hi guys, sorry about not responding sooner, I stopped getting alerts for posts to this forum for whatever reason. 😅

For those having trouble getting the cache headers to show up (or caching to work in general), please check that the rules you added to the .htaccess file are at the top of the file, or at the least come before any rules containing the [L] flag. This flag will stop .htaccess processing and could prevent the cache plugin related rules from being run.

@rdn Are you still running into issues with this?
Thank you very much for your follow-up @Michael A.
problem finally Solved according to your solution (y)

Finaly
litespeed-tag headers : hit

litespeed-cache.jpg
 
My forum has two theme options: default theme (light in colour) and Shades of grey (dark theme). I am noticing that some pages are being shown in dark theme to guests, others in light theme. I have a thread on this here: https://www.litespeedtech.com/suppo...with-different-styles-shown-for-guests.18284/

Is anybody else getting this? Any solution?

Edit: I also have Redis and Cloudflare, if that makes any difference.

Howdy @Jon12345 ,

It looks like this was caused by a regression in our .htaccess rule set. Thank you for pointing this out!

I will post an updated set of rules shortly.

Regards,
-Michael
 
Hey guys,

I've updated our .htaccess cache rules to fix the cache not varying on style or language as it did in the past. The updated rules are contained below:

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


Thank you and sorry for any inconvenience,
-Michael
 
@Michael A. Just to be clear, how does this affect first time guests to a site? If your default theme is a light them, but you have the option of a dark theme, which will these first time guests see? Is it random?
 
@Michael A. Just to be clear, how does this affect first time guests to a site? If your default theme is a light them, but you have the option of a dark theme, which will these first time guests see? Is it random?

Good question.

First time guests should see whatever the default theme is.

The way the vary works is by checking the xf_style_id cookie and storing a different cache copy based on it's value. If the Dark theme has an xf_style_id value of 2 for example, guests will not be served this page unless their copy of this cookie also has a value of 2. First time guests in this case will not have this cookie set, so it will vary on the equivalent of not set which would be your default theme.

Regards,
-Michael
 
Top Bottom