I'd like to drill on this a little further. First, let me point out that we
have disabled the parser cache ($wgEnableParserCache = false;). I'd like to
generalize and point out that the Mediawiki's wikitext has multiple
codes/tags that can be used to yank external content into the wikitext of an
article. My original example was for a site variable. Another good example
is a template. I compared the behavior of the two inclusion techniques.
When I update a template, all articles that include the template are
rendered with the latest page. In contrast, when a system variable changes,
the pages are not rendered with the latest content. Is there anyway to get
the template's caching behavior with the variables? I really don't want to
turn off browser-side caching in it's entirety as I'm sure it will kill
performance.
Thanks again,
Jeff
-----Original Message-----
From: mediawiki-l-bounces(a)Wikimedia.org
[mailto:mediawiki-l-bounces@Wikimedia.org] On Behalf Of Zigger
Sent: Sunday, June 12, 2005 12:21 AM
To: MediaWiki announcements and site admin list
Subject: Re: [Mediawiki-l] Variables in Wikitext & Browser Caching
The "caching problem" is by design, for performance reasons.
With the parser cache on and current, the same value will always be
returned, unless "&action=purge" is appended to a query-style URL.
With the parser cache off or expired, as you found, the browser can request
a forced refresh e.g. via Ctrl-F5. Alternatively, browser-side caching can
be disabled site-wide for all users ($wgCachePages), per logged-in-user
(Special:Preferences), or as a user-preference default
($wgDefaultUserOptions['nocache']).
For an example of using an extension to get dynamic content by
time-tricking, see
http://www.islandseeds.org/wiki/Test:Fortune and
http://meta.wikimedia.org/wiki/MediaWiki_FAQ#How_do_I_add_my_own_dynamic_con
tent_to_MediaWiki.3F
-- Zigger
On 6/11/05, Wolfe, Jeff wrote:
...
The main page of my wiki has the variable {{NUMBEROFARTICLES}} on it. I'm
having a problem with multiple client browsers caching this page and not
reloading when the variable changes. If I force a reload, the number is
rendered correctly. If I change the wikitext, the page is reloaded.
Otherwise, I can press F5 all day and not get the latest copy if only the
variable has changed. I have verified this with both IE 6.0 and Firefox
1.0.1. I'm running MediaWiki 1.4.1 with a 'recent changes' patch.
Any ideas? Seems like a caching problem with variables. Can I disable
caching for this page only?
...
_______________________________________________
MediaWiki-l mailing list
MediaWiki-l(a)Wikimedia.org
http://mail.wikipedia.org/mailman/listinfo/mediawiki-l