I remember trying that too and the problem still occurred on Memcache too.We have done a few tests in the meantime and attribute the problem to Redis.
First we tested the XFs disk cache where the problem no longer occurred.
We are now using Memcache and there is no longer a problem with PageCache.
I have tried all three Redis, Memcached and Filesystem cache, and problem occurring in all of them.We have done a few tests in the meantime and attribute the problem to Redis.
First we tested the XFs disk cache where the problem no longer occurred.
We are now using Memcache and there is no longer a problem with PageCache.
I remember trying that too and the problem still occurred on Memcache too.
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Memcached';
$config['cache']['config'] = [
'server' => '127.0.0.1'
];
$config['cache']['enabled'] = true; $config['cache']['provider'] = 'Memcached'; $config['cache']['config'] = [ 'server' => '127.0.0.1' ];
Completely without Redis, and only Memcached, there are no more problems here.
Code:$config['cache']['enabled'] = true; $config['cache']['provider'] = 'Memcached'; $config['cache']['config'] = [ 'server' => '127.0.0.1' ];
$config['cache']['enabled'] = true;
$config['pageCache']['enabled'] = true;
$config['cache']['context']['page']['provider'] = 'Memcached';
$config['cache']['context']['page']['config'] = [
'host' => '127.0.0.1',
'port' => 6379,
'database' => 4
];
I have tried all three Redis, Memcached and Filesystem cache, and problem occurring in all of them.
Can you provide the full config code used for memcached and disk cache
$config['cache']['enabled'] = true;
$config['cache']['provider'] = 'Filesystem';
$config['cache']['config'] = ['directory' => '/var/www/vhosts/mydomain.tld/httpdocs/internal_data/xenforo-cache']; // fullpath must exist!
$config['cache']['registry'] = true;
$config['cache']['sessions'] = true;
$config['cache']['css']['enabled'] = true;
// guest page cache
$config['pageCache']['enabled'] = true;
$config['pageCache']['provider'] = 'Filesystem';
$config['pageCache']['config'] = ['directory' => '/var/www/vhosts/mydomain.tld/httpdocs/internal_data/xenforo-cache'];
$config['pageCache']['lifetime'] = 300;
$config['pageCache']['recordSessionActivity'] = true;
Interesting. I'm going to see if I can recreate this tomorrow if I get a chance on a different server with a base install. If I can hopefully it will aid in one of us getting to the bottom of this for @JoyFreak
<xf:if is="$xf.visitor.user_id">
<script>
function mr_setCookie(name,value,days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days*24*60*60*1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + (value || "") + expires + "; path=/";
}
mr_setCookie("mr_logged_out","1","")
</script>
</xf:if>
I did submit a support ticket some time ago about this, but I don't think it was seriously being looked at. They pointed me to this thread.If anyone has a consistent reproduction case they are more than welcome, as ever, to submit a ticket with those details. Perhaps even the very customer you speak of absolutely should enable it and they can then report the issue to us if they do encounter it.
I did submit a support ticket some time ago about this, but I don't think it was seriously being looked at. They pointed me to this thread.
The situation is reproducible on a clean XF 2.1 install without add-ons.
Tried with redis and filecache, same problem: after logout a status 304 page is served.
Although this is a server side problem, it only happens when guest page cache is on.
Any other thoughts about this?
Does that work even without cloudflareDid you try my solution above?
arn
Hmm. I guess not exactly. What web server are you using. Nginx or Apache?Does that work even without cloudflare
Nope, I also don't use cloudflare.
Running apache.
this will prevent Apache from returning a 304. And it might help. This isn't probably the best long term solution, but will narrow it down
We use essential cookies to make this site work, and optional cookies to enhance your experience.