I'm new to this, but I'm learning and understanding how LiteSpeed operates.
One of my websites is a forum using the IPS Invision community forum software.
At first, I had caching set for the entire site for both guest and login users, which caused issues when guest cache pages were served to login users.
I then figured out how to set Litespeed to cache only for guest visits and not cache logged-in users via a cookie in the .htacess settings.
I now read about the public and private caching features, where guests are assigned to public caching and logged-in users are assigned to private caching via a cookie.
I assume that in private caching, logged-in members will get served a cache page for their specific account. If this is the case, can you alter my .htaccess file data to activate the public cache for all guests, the private cache for logged-in members, and the crawler ESI if those will not cause any issues for me?
Thanks.
One of my websites is a forum using the IPS Invision community forum software.
At first, I had caching set for the entire site for both guest and login users, which caused issues when guest cache pages were served to login users.
I then figured out how to set Litespeed to cache only for guest visits and not cache logged-in users via a cookie in the .htacess settings.
I now read about the public and private caching features, where guests are assigned to public caching and logged-in users are assigned to private caching via a cookie.
I assume that in private caching, logged-in members will get served a cache page for their specific account. If this is the case, can you alter my .htaccess file data to activate the public cache for all guests, the private cache for logged-in members, and the crawler ESI if those will not cause any issues for me?
Thanks.
Code:
<IfModule litespeed>
CacheLookup on
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/admin/|/matomo/|/arrowchat/ [NC]
RewriteRule .* - [E=Cache-Control:no-cache]
RewriteCond %{HTTP_COOKIE} My-Site_loggedIn|My-Site_login_key [NC]
RewriteRule .* - [E=cache-control:no-cache]
RewriteRule .* - [E=cache-control:max-age=120]
</IfModule>