Boost Performance of your Xenforo Community!

@usmannasir , please modify this htaccess

<IfModule litespeed>
    CacheLookup public on
    RewriteEngine On
     # cache
     RewriteCond %{HTTP_COOKIE} !xf_user [NC]
     RewriteRule .* - [E=Cache-Control:max-age=120]
     # no cache
     RewriteCond %{HTTP_COOKIE} xf_user [NC]
     RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>

to this one from LS default

# 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>

as code you mentioned will keep issue cache with admins , and sure Cache-Control:max-age=120 is better :slight_smile:

thank you

1 Like