• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
XenForo Forum with Nginx fastcgi_cache full page guest caching

XenForo Forum with Nginx fastcgi_cache full page guest caching

Ernest L. Defoe

Well-known member
#83
Wish I could get my site to load that fast. Initial load on the webpagetest site says 8 seconds but repeat is like 5 seconds but I'm not comfortable enough to make changes like these. I do most of the updating only because Centmin makes it easy to update most things and then a good ol yum update takes care of the rest.
 

Ernest L. Defoe

Well-known member
#86
Why ?
Only 2 configs to modify on the server end and only 1 addon need to be installed on XenForo.
Isn't an easy task? :)
I'm not good with that kind of stuff. Everytime I edit a file like that I end up messing things up. Ask MattW he's bailed me out of a few jams because of it.
 

Amin Sabet

Well-known member
#91
If anyone makes a mistake like I did and ends up with members logged in as other members, I think a cookie prefix change to force everyone to logout is needed to make sure no one stays logged in as someone else.

I mention this because several days after I fixed my setup error, someone posted as someone else, which I think was because they had stayed logged in all that time.

If you do change cookie prefix in config.php, then you also have to make the changes Roldan mentioned here: https://xenforo.com/community/threa...page-guest-caching.124421/page-2#post-1121437

Personally, I have gone back to life without fastcgi_cache. It definitely sped up my site, but I was seeing occasional desktop ads on mobile even though I uncommented the mobile specific lines in the resource. Could very well still be user error on my part, but I want to keep things simple and don't want to troubleshoot it at this time.
 

eva2000

Well-known member
#92
I mention this because several days after I fixed my setup error, someone posted as someone else, which I think was because they had stayed logged in all that time.
Probably #1 reason why i don't use fastcgi_cache on my live forums yet - needs alot of tuning and testing which is reserved for a test staging copy of your forums not live :)
 

RoldanLT

Well-known member
#96
What's the best way to do this? I have a ton of avatars showing on my homepage: https://www.mu-43.com/
library/XenForo/Template/Helper/Core.php line 1844
Add:
PHP:
XenForo_Visitor::getInstance()->user_id &&
From original code:
PHP:
if (!empty($user['user_id']) && $forceType != 'default')
to make it
PHP:
if (XenForo_Visitor::getInstance()->user_id && !empty($user['user_id']) && $forceType != 'default')
 

Amin Sabet

Well-known member
I'm going to try again. For desktop/mobile support, do I include both of these in php.conf?

Code:
fastcgi_cache_key       $scheme$request_method$host$request_uri$mobile_request;
fastcgi_cache_key       $scheme$request_method$host$request_uri;
or just this one?

Code:
fastcgi_cache_key       $scheme$request_method$host$request_uri$mobile_request;