XenForo LiteSpeed Cache [Deleted]

Hey Mike,

Any issues with the main index page not showing the users logged when they open up their browser again? (as soon as my users click any other link, it shows them as logged in, just not on the main forum page)

This is, of course, assuming you are using this resource as well.
 
@lswave did some testing and here's what he found.

I tested in chrome.
I closed chrome after accessing http://www.controlbooth.com/forums/bug-reports/ (have logged in with 9voltnewbie (a test account)
then open chrome, access home page http://www.controlbooth.com, it shows "Log in or Sign up" in upper-right corner.
checked in chrome dev tools, no cookie "xf_skipPageCache" there.
but access http://www.controlbooth.com/forums/bug-reports/ again, user name "9voltnewbie" is showing on the page, but still no cookie "xf_skipPageCache";
access homepage again, still shows "Log in or Sign up", and can see "X-LiteSpeed-Cache: hit" response header there ! and no cookie "xf_skipPageCache"

so keep accessing above 2 pages, they are no change all the time.

So, if the front page is being cached, can the code have a chance to initiate/instantiate the cookie?
 
1.
my test showed that it may relate to "Stay Logged in" checked. if uncheck the option, issue disappear (need others' confirmation with more tests).

2.when close the chrome and re-open it, the cookie "xf_skipPageCache" is cleared.
so per the rewriterule
Code:
<IfModule litespeed>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{HTTP_COOKIE} !xf_skipPageCache
RewriteRule .* - [E=Cache-Control:max-age=60]
</IfModule>
if a xenforo page is cached, it'll return to client directly by web server(litespeed), as if it's a static file, bypassing the php script (xenforo)
since homepage is easier to get cached, so users tend to find the issue on home page.

3. so here close the browser, re-open it, can mimic it by delete the cookie "xf_skipPageCache" in purpose, and access homepage, most likely you'll see a cached home page with "Log in or Sign up" in upper-right corner, as if you're a non-logged in user.

4. to prevent the cookie being deleted by close-reopen the browser or other incidents, every response to a logged-in user can set-cookie "xf_skipPageCache", not sure if it's feasible way to resolve the issue or minimize the side-effect ( a logged in user see a cached page). or any better alternative way in php.
 
Hmm... is there a way to exclude the main index.php from caching? That's the quick and dirty answer, but I would still prefer to find a more permanent solution.
 
My members are still yelling at me for this issue. I'm at my wits end. I've tried changing the litespeed config to change the Cache Request with Cookie from Yes to Not Set. Didn't seem to help.
 
please don't change any litespeed cache settings, it may not help. just now I visited the the add-on code, in Global.php
after
Code:
            $response = $fc->getResponse();
            $response->setHeader('X-LiteSpeed-Cache-Control','no-cache');
add
Code:
            XenForo_Helper_Cookie::setCookie(XenForo_Application::getOptions()->litespeedcache_cookiename, true);
no sure it will work or make difference.
 
please don't change any litespeed cache settings, it may not help. just now I visited the the add-on code, in Global.php
after
Code:
            $response = $fc->getResponse();
            $response->setHeader('X-LiteSpeed-Cache-Control','no-cache');
add
Code:
            XenForo_Helper_Cookie::setCookie(XenForo_Application::getOptions()->litespeedcache_cookiename, true);
no sure it will work or make difference.

Did not seem to help.
 
but I tested your forum with the account you provided to me before, now looks working fine, no weird behavior observed. check or uncheck "Stay Logged In"

when logged in, for every page in response headers, there is:
Set-Cookie: xf_skipPageCache=1; path=/

this is just what the added code intended to do. so when a logged in user visited the forum homepage, it won't get a cached page.
but this workaround may bring another tiny issue: when logged out, the cookie xf_skipPageCache=1 also being set.
so it's just an workaround, expect XenForo developer provide an ideal solution to address all the issues.
 
I know a lot of people are waiting for HHVM support, so here is an update on it that Michael shared by ticket:
HHVM support is under development, but it's still a long way off. It will be released first with OpenLiteSpeed so that we can get the bugs out outside of the Enterprise environment.
 
Query... Is this plugin going to cause issues on HTTPS domains? Apparently for guest users, gravatars are loading in HTTP mode causing mixed content warnings.
 
I had to disable this plugin after users reported that forum showed them logged in as another person even though when they posted, it was under their own name (for obvious reasons). a bunch of folks also reported that they kept logging out randomly repeatedly.
 
Yup. I am on 1.4 with SSL. I could have made mistake with the configuration but I am pretty sure I followed all the steps correctly. I personally did not face the issue of seeing cached content of another user myself. But enough members reported it so I had to disable this plugin. You can check the complaints here after I turned on the plugin.
 
Waiting for Litespeed to add support for SPDY. Turned on Memcache. Not really an expert on server optimization so basically nothing special. Just stock XenForo running on a Litespeed server. I really want this plugin to work because it sounds great. My server guy recommended it.
 
I had to disable this plugin after users reported that forum showed them logged in as another person even though when they posted, it was under their own name (for obvious reasons). a bunch of folks also reported that they kept logging out randomly repeatedly.

Yup, having the same issue.
 
Top Bottom