[Mediawiki-l] User options and caching??

Platonides Platonides at gmail.com
Wed Aug 3 13:41:33 UTC 2011


Daniel Barrett wrote:
> I wrote a parser tag that displays some user options that are set in Special:Preference. It gets embedded in an article like this:
>
> <mystuff/>
>
> However, when users change their options, my parser tag appears still displays old, cached data. I have tried everything I can think of to stop this caching:
>
> static function myHookFunction($input, $args, $parser) {
>      $parser->disableCache();
>      global $wgEnableParserCache, $wgCachePages, $wgParser;
>      $wgParser->disableCache();
>      $wgEnableParserCache = false;
>      $wgCachePages = false;
>      ...
> }

$parser->disableCache(); should have worked. Which MediaWiki version are 
you using? Were you using the file cache?




More information about the MediaWiki-l mailing list