Need some help with Public and private cache settings.

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

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>
 

serpent_driver

Well-Known Member
#2
A forum is not page cache friendly. Too many changes to the content in too short a time. You also need an intelligent purge solution for new or changed threads, which can only be created to a very limited extent using .htaccess. If at all, the cache and purge configuration must be done using PHP.
 
#5
The XenForo plugin states this
"The current community version of LSCXF2 will only cache and serve pages for non-logged in users. After a user has logged in, their page requests will always hit the backend."
That means my current setup should be fine for only caching guess but need more uptimazation as what the plugin does for guest caching.
 
Top