This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Forums » eZ Publish 5 Platform » Cache problem and logout

Cache problem and logout

Cache problem and logout

Thursday 26 June 2014 2:34:23 pm - 7 replies


I have a problem on an intranet site developed EZ5. When I log out by clicking on the "Logout". I come back on the same page. I'm actually disconnected but I have to update my page with F5 to get to see the page of login form. I think I have a problem with the cache, but I do not see how to do. Have you and idea ?



Thursday 26 June 2014 4:41:06 pm

Is Varnish running?

Thursday 26 June 2014 5:31:03 pm

No varnish installed

Thursday 26 June 2014 5:31:57 pm

no varnish installed

Friday 05 September 2014 3:56:00 pm


I have a very similar problem, except that the problem occurs randomly... In most case, there's no problem, but sometimes it seems to even happen on just restarted browser when accessing the site.

It seems that I found a test case were the problem occurs nearly all the time. I have actually 2 "front" siteaccess (on same domain, with URI match, and with different session name) with the same rules that force anonymous user to log-in.

Then, on the same browser tab :

  • I log on the siteaccess1 with user1
  • I log on the siteaccess2 with user2
  • On siteaccess2, I logout user2 => I'm rightly redirected to /login
  • On siteaccess1, I logout user1 => I'm stuck at what seems the cached view by user1, with my esi blocks displaying anonymous' content
  • Refreshing page redirect me to /login

I'm on eZP Community Project 2014.03 on a PHP 5.4.4 (with APC) server with the default Symfony's Http Cache.

From what I found so far, it looks like the userHash isn't set correctly...

Has someone found a clue to fix this kind of problem ?

Best regards,

Wednesday 15 October 2014 2:15:08 pm

Up happy.gif Emoticon

Wednesday 15 October 2014 3:09:47 pm

@Johann Roche: Which version are you on? Same as Marc?


And are you using ETAG or modified-since headers or something else in terms of http cache not used by default?

Modified on Wednesday 15 October 2014 3:10:56 pm by André R

Tuesday 21 October 2014 9:18:02 am

It seems to be link to the cache. I think that i have a code somewhere that cause me this.

I found a bad temporary solution in the index.php :

 $response = $kernel->handle( $request );
//Force no cache
$response->headers->addCacheControlDirective('no-cache', true);
$response->headers->addCacheControlDirective('max-age', 0);
$response->headers->addCacheControlDirective('must-revalidate', true);
$response->headers->addCacheControlDirective('no-store', true);
//End force no cache

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from