Vary the cache on session, Token and LoggedOut cookies, but not UserID cookie. The...
authorTim Starling <tstarling@users.mediawiki.org>
Wed, 20 Feb 2008 04:13:24 +0000 (04:13 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Wed, 20 Feb 2008 04:13:24 +0000 (04:13 +0000)
commit19c8fa643cc2f2392b7958f8d0f08347ea756d0b
tree3f69162da1a6aa382589226c63ddbe5c42dda98f
parent801a155961641cae93efc47522845231e42855e5
Vary the cache on session, Token and LoggedOut cookies, but not UserID cookie. The session and Token cookies are necessary because they can represent credentials. The UserID cookie is sometimes present after the credential cookies are expired and thus the request is anonymous. Need to vary on the LoggedOut cookie to prevent Squid from returning a 304 response for a logged-in page view cached on the client. Presumably this could be better dealt with with ETags.

Always send Cache-Control: private when there is a cache-varying cookie present, to prevent pollution of the logged-in user cache with logged-out page views. This missing logic is why people have been reporting getting logged out.
includes/OutputPage.php