[Mediawiki-l] Mediawiki extension API

Rowan Collins rowan.collins at gmail.com
Mon Dec 6 16:26:32 UTC 2004


On Mon, 06 Dec 2004 20:10:22 +0900, Jean-Christian Imbeault <jci at gol.com> wrote:
> I've read the meta-wiki information page on writing your own mediawiki
> extension but I have a question on behaviour.
> 
> If you write and extension does the tag (extension) get evaluated every
> time the article (page) is loaded or just once and then stored in the DB
> as is?

Well, it's kind of half-way between the two: the tag is evaluated
every time the page is *parsed* (it isn't stored as static in the DB),
but due to caching, this is not the same as every time it is *viewed*
(it may be stored by the server, your browser, or some other
intermediate cache).

For possible ways around this (i.e. to force the page to be re-parsed
on every view), you might want to search the archives of this list
and/or the dev list wikitech-l: type "site:mail.wikipedia.org cache"
or somesuch into Google.

I wonder if it would be good to have some method for this built in to
the distributed code - e.g. a way of an extension setting a special
"no-cache" flag on the article in which it was operating, to indicate
that dynamic content has been added; this would be reset whenever the
page was saved in case the tag were removed...? One problem is that
this would need to propogate back from templates somehow: if
[[Template:foo]] contains "<dynamic>stuff that changes every 5
minutes</dynamic>", then any page containing "{{foo}}" will also need
to remain un-cached... until Template:foo loses the dynamic content,
that is... erk...

-- 
Rowan Collins BSc
[IMSoP]



More information about the MediaWiki-l mailing list