How does the caching of pages for the WMF projects work?
== Setting ==
On 1th April the [[MediaWiki:Tagline]] page, controlling the "From Wikipedia, the free encyclopedia" text line, was changed several times.
From; 08:06, 1 April 2008 until; 08:07, 1 April 2008
so at max 1 minute, probably shorter, the text was;
"From Britannica, the encyclopedia that is slightly more accurate than Wikipedia according to a paper in the eminent journal ''Nature''... "
After that is was changed again a couple of times in to different messages during that day; From Wikipedia, the free Pokémon encyclopedia From Whippetpedia, the free encyclopedia for dogs From Wikipedia, the free encyclopedia administer by people with a stick up their lavender passageway From Wikipedia, the free encyclopedia that triples in population every six months
One of the edit summary's was; "Relax; these are completely harmless, and just for a day. "Yes, we're aware of Wikipedia's criticisms, and we're still confident enough in our project that we can joke about it"
== On topic ==
When I requested the page; http://en.wikipedia.org/wiki/Blue_Gender
around midnight 2008-04-07 I noticed that the tagline on that page was;
"From Britannica, the encyclopaedia that is slightly more accurate than Wikipedia according to a paper in the eminent journal ''Nature''... "
When I logged in it was gone, back the normal one. Also when I logged out again it was also again the normal tag line.
== My question ==
How does the caching works?
I suspect that I have seen that changed tag line on that page because that specific page was cached just in that very short time frame the tag line was changed to that text. And because the page was not edited that cached version was not renewed.
What I like to know is how long can cached version being used to show a page when it is requested? When does it expire?
And because there are many squids; can it be that depending the squid who serves you can get different results?
I would like to know that for use in wikizine.
On 08/04/2008, Walter Vermeir walter@wikipedia.be wrote:
How does the caching of pages for the WMF projects work? One of the edit summary's was; "Relax; these are completely harmless, and just for a day. "Yes, we're aware of Wikipedia's criticisms, and we're still confident enough in our project that we can joke about it"
Not a full answer, but: UI elements change *really slowly*. ?action=purge doesn't change them, I'm not sure if there's a way to force a change (or should be for even local wiki admins). I discovered this fiddling with MediaWiki:Sidebar and MediaWiki:Copyright on en:wp ... changes sometimes took hours to show. So the people playing April Fool gags were right that it would change back, but certainly not on the order of minutes.
- d.
David Gerard <dgerard@...> writes:
... changes sometimes took hours to show. So the people playing April Fool gags were right that it would change back, but certainly not on the order of minutes.
- d.
Thanks for the responds. In the case I noticed it was 7 days.
Walter
On 08/04/2008, Walter Vermeir walter@wikipedia.be wrote:
David Gerard <dgerard@...> writes:
... changes sometimes took hours to show. So the people playing April Fool gags were right that it would change back, but certainly not on the order of minutes.
Thanks for the responds. In the case I noticed it was 7 days.
*splutter* Er, yes. Probably someone should let the admins who made said changes know just how long they lasted for some people.
- d.
On Tue, Apr 8, 2008 at 8:14 AM, David Gerard dgerard@gmail.com wrote:
On 08/04/2008, Walter Vermeir walter@wikipedia.be wrote:
David Gerard <dgerard@...> writes:
... changes sometimes took hours to show. So the people playing April Fool gags were right that it would change back, but certainly not on the order of minutes.
Thanks for the responds. In the case I noticed it was 7 days.
*splutter* Er, yes. Probably someone should let the admins who made said changes know just how long they lasted for some people.
It's not just some people it's any anon hitting some pages until those pages get purged by something else. Site wide system messages do not cause cache purging because otherwise every edit to them would cause an outage.
For messages which must display everywhere and which must change javascript injection should be used. (This is how the fundraiser notices work). Of course, in playing with javascript there are even more possible ways to kill the site.
The technical issues aside, ... Does enwiki need to add "Are you smart enough to avoid falsely and misleadingly using a competitors trademark on every page on site site just for lulz?"
Walter Vermeir wrote:
How does the caching of pages for the WMF projects work?
== Setting ==
On 1th April the [[MediaWiki:Tagline]] page, controlling the "From Wikipedia, the free encyclopedia" text line, was changed several times.
From; 08:06, 1 April 2008 until; 08:07, 1 April 2008
so at max 1 minute, probably shorter, the text was;
"From Britannica, the encyclopedia that is slightly more accurate than Wikipedia according to a paper in the eminent journal ''Nature''... "
After that is was changed again a couple of times in to different messages during that day; From Wikipedia, the free Pokémon encyclopedia From Whippetpedia, the free encyclopedia for dogs From Wikipedia, the free encyclopedia administer by people with a stick up their lavender passageway From Wikipedia, the free encyclopedia that triples in population every six months
One of the edit summary's was; "Relax; these are completely harmless, and just for a day. "Yes, we're aware of Wikipedia's criticisms, and we're still confident enough in our project that we can joke about it"
== On topic ==
When I requested the page; http://en.wikipedia.org/wiki/Blue_Gender
around midnight 2008-04-07 I noticed that the tagline on that page was;
"From Britannica, the encyclopaedia that is slightly more accurate than Wikipedia according to a paper in the eminent journal ''Nature''... "
When I logged in it was gone, back the normal one. Also when I logged out again it was also again the normal tag line.
== My question ==
How does the caching works?
I suspect that I have seen that changed tag line on that page because that specific page was cached just in that very short time frame the tag line was changed to that text. And because the page was not edited that cached version was not renewed.
What I like to know is how long can cached version being used to show a page when it is requested? When does it expire?
And because there are many squids; can it be that depending the squid who serves you can get different results?
I would like to know that for use in wikizine.
Firstly note that we are talking about the anonymous user cache. Pages for logged-in users are generated each time based on various cached and uncached data. Pages for anonymous users are cached in their entirety.
By default, wiki pages cached in squid expire after 31 days. The long expiry time is needed to obtain a decent hit rate for rarely-requested pages.
MediaWiki uses a variety of methods to ensure that the information the user sees is up to date. The first and most obvious is that when a page is edited, its cache entry is immediately deleted (i.e. purged) from all squids.
Another method is to use tracking tables to track the dependencies of the cached item. We track links, templates, categories and local (non-commons) image usage. When an object changes, we check the tables to see what cached pages depend on that object, and we purge them.
It is not feasible to purge every single page on the wiki whenever an admin changes a user interface element such as the tagline. The performance impact would be too great. So when we need to make temporary changes to the HTML, such as site notices, we can do two things:
* Temporarily reduce the expiry time for newly cached pages * Use JavaScript to dynamically load the changeable area on the client side
Originally we did the first, but now we have the tools in place to do the second. Admins on April 1 would have been well advised to use such a technique, such as JavaScript or an iframe.
-- Tim Starling
wikitech-l@lists.wikimedia.org