Guest page caching

JoyFreak

Well-known member
I am having issues with the guest page cache working with Redis.

It seems that when I log out, the page seems to cache as if though I am still logged in when I am not. When I click my username, it gives an security error.

I have also tried it with Memcache and same thing.

My site is running behind Cloudflare FWIW.
 
This is LiteSpeed or Nginx Full page caching?

Cause I cannot re-produce this with default XenForo Full Page Caching.
 
This is LiteSpeed or Nginx Full page caching?

Cause I cannot re-produce this with default XenForo Full Page Caching.
This is the built in XF 2.1 guest page cache, using either Redis or Memcached

PHP:
$config['pageCache']['enabled'] = true;
$config['pageCache']['recordSessionActivity'] = true;
$config['cache']['context']['page']['namespace'] = 'xfredispagecache_';
$config['cache']['context']['page']['provider'] = 'Redis';
$config['cache']['context']['page']['config'] = [
        'host' => '127.0.0.1',
        'port' => 6379,
        'database' => 4
        ];
 
For info, when guest page cache is enabled, I don't see any of the XF headers

201858

Would expect:

201859
 
PHP:
$config['pageCache']['enabled'] = true;
$config['pageCache']['recordSessionActivity'] = true;
$config['cache']['context']['page']['namespace'] = 'xfredispagecache_';
$config['cache']['context']['page']['provider'] = 'Redis';
$config['cache']['context']['page']['config'] = [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 4
];
why don't i see this in the config file?
 
Default theme is the same as well. I've never seen the built in XF page cache do this before (and I've set it up dozens of times on different sites).
 
Default theme is the same as well. I've never seen the built in XF page cache do this before (and I've set it up dozens of times on different sites).
if you bypass cloudflare privately to the origin, does guest page caching work ?
 
If works, but not as expected. Same as above.
it works as in guest page cache works to only cache for guests and logout doesn't cache when bypassing cloudflare ? or you mean bypassed cloudflare, still results in logged out uses being caught in guest caching ?
 
When you log out, you get the same page you had prior to logging out. It get's stuck on that page, and the browser shows a 304 not modified. It still shows you as being logged in (even though you aren't). Navigating off the home page, shows you not logged in, but going back to the home page, shows you logged in.
 
@eva2000 can I switch to your guest page, css cache (with xon's add-on) at: https://community.centminmod.com/th...on-centmin-mod-123-09beta01-lemp-stack.16060/
This is my current one, any changes or just use same as yours.
Code:
$config['cache']['enabled'] = true;
$config['cache']['sessions'] = true;
$config['cache']['namespace'] = 'xfredis_';
$config['cache']['provider'] = 'SV\RedisCache\Redis';
$config['cache']['config'] = array(
    'server' => '127.0.0.1',
    'port' => 6379,
    'connect_retries' => 2,
    'use_lua' => true,
    'compress_data' => 6,
    'read_timeout' => 1,
    'timeout' => 1,
    'serializer' => 'igbinary',
    'persistent' => true,
);
 
@eva2000 can I switch to your guest page, css cache (with xon's add-on) at: https://community.centminmod.com/th...on-centmin-mod-123-09beta01-lemp-stack.16060/
This is my current one, any changes or just use same as yours.
you can try as it's what i use on my test xf 2.1 forums

When you log out, you get the same page you had prior to logging out. It get's stuck on that page, and the browser shows a 304 not modified. It still shows you as being logged in (even though you aren't). Navigating off the home page, shows you not logged in, but going back to the home page, shows you logged in.
same happens if you log out and close and reopen your browser ? what do you have in CF cache level/browser cache expiration settings ?

201894
 
same happens if you log out and close and reopen your browser ? what do you have in CF cache level/browser cache expiration settings ?
Cloudflare is irrelevant, I totally disabled it, and routed traffic direct to the site. Still exactly the same.

The page returned a 304 not modified header, so was showing the cached page specific to my browser. If I totally disabled local browser cache, I got the correct page returned (via chrome developer tools).
 
Cloudflare is irrelevant, I totally disabled it, and routed traffic direct to the site. Still exactly the same.

The page returned a 304 not modified header, so was showing the cached page specific to my browser. If I totally disabled local browser cache, I got the correct page returned (via chrome developer tools).
Strange then. You have also enabled session cache and enabled native XF 2.1 global cache to use redis as well ?
 
I went from not being able to recreate the issue to now being plagued with it and am not having much luck in figuring it out either.
 
Cloudflare is irrelevant, I totally disabled it, and routed traffic direct to the site. Still exactly the same.

The page returned a 304 not modified header, so was showing the cached page specific to my browser. If I totally disabled local browser cache, I got the correct page returned (via chrome developer tools).
FYI, seems site redirects seem mis-configured. Whether or not that is the issue though ??
Code:
https://joyfreak.com/ 301 redirect -> http://www.joyfreak.com/
http://joyfreak.com/ 301 redirect --> http://www.joyfreak.com/
http://www.joyfreak.com/ HTTP 200 answered instead of redirect to https://www.joyfreak.com/
 
FYI, seems site redirects seem mis-configured. Whether or not that is the issue though ??
Code:
https://joyfreak.com/ 301 redirect -> http://www.joyfreak.com/
http://joyfreak.com/ 301 redirect --> http://www.joyfreak.com/
http://www.joyfreak.com/ HTTP 200 answered instead of redirect to https://www.joyfreak.com/

Doubt it, since the issue is non-existent without guest page caching enabled. Good catch though, I'll straighten this out for him.
 
Back
Top Bottom