On Thu, 12 Apr 2012 12:54:41 -0700, Arthur Richards
<arichards(a)wikimedia.org> wrote:
On Thu, Apr 12, 2012 at 12:43 PM, Daniel Friesen
<lists(a)nadir-seen-fire.com>wrote;wrote:
Might this be a browser caching issue, not a server caching issue?
Yeah, I believe so.
As a temporary hack you could try updating the
*_LoggedOut cookie when
you
change the view cookie to invalidate previous cached pages.
Intriguing - I'm unfamiliar with the logged out cookie hacks. Can you
point
me to an example? Would/does this actually have any affect on browser
caches?
Thanks!
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=include…
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=include…
https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=include…
Basically we set a *_LoggedOut cookie when you log out of the wiki. That
cookie includes the timestamp at which you logged out. And Last-Modified
headers contain the current time. So when you visit a page after logging
out MW looks at your If-Modified-Since timestamp, the page's timestamp,
and your logged out cookie. If the If-Modified-Since is earlier than the
time in your LoggedOut cookie MW will serve a new page with a new
If-Modified-Since; Assuming that the page in your cache was cached when
you were logged in and needs to be purged.
Of course this is a complete hack. It forces one lane of cache when a
browser could be capable of keeping the anon cache around for when the
logged in user logs back out. (I wish for the possibility of user caches
that persist between logins -- re-login, or user switching -- but we
update user_touched when you merely login) It forces us to purge anon
cached pages to replace them with the same anon cached page (Visit <X> as
anon, log in, visit <Y>, log out, visit <X> again; You should get a 200
instead of a 304 even though <X> should be the same anon page you visited
before). And of course it falls apart when you 'log out' by letting
cookies expire / purging them.
Relevant bug:
https://bugzilla.wikimedia.org/show_bug.cgi?id=31639
Although I believe there are some more recent revelations on the topic
left in IRC logs that didn't make it into there.
--
~Daniel Friesen (Dantman, Nadir-Seen-Fire) [
http://daniel.friesen.name]