Last modified: 2011-04-14 15:10:27 UTC
http://lists.wikimedia.org/pipermail/wikitech-l/2009-August/044950.html and the thread preceeding it, there is a suggestion to cache constant messages having {{SITENAME}} or other invariant content in a way avoiding the re-interpretation and reparsing them. While at first sight one would assume that this is done already, increased load times mentioned in the first post to the thread, http://lists.wikimedia.org/pipermail/wikitech-l/2009-August/044921.html suggest that it is not so. See also: http://www.mediawiki.org/wiki/Project:Support_desk/Archives/Miscellaneous/007#tuning_MediaWiki:Aboutsite There is another possible advantage of this kind of caching, when messages are being passed to JavaScripts, they should be taken from the cache, which means that the JavaScripts do not have to deal with parsing the wikisyntax of these invariant parts.
Certain magic words such as {{CURRENTDAY}} have a cache expiry time (usually 1 hour for time-dependant stuff); if we honor those I think we should be fine. Of course the downside is that changing $wgSitename doesn't change {{SITENAME}} immediately, but that's true for page content as well.