Extension:MagicNoCache

Description
This extension creates a new magic word  __NOCACHE__  and disables the cache for any page in which it finds it.

The extension will attempt to disable the caching of the page by calling the disableCache function of the Parser object and also the enableClientCache function of the OutputPage object ($wgOut)

I wrote the extension because I was looking for a way to make sure that specific pages never get cached as they get get updated extremely frequently.

Update: Please see discussion page for patches if you are running MediaWiki of versions later than 1.10. Specifically, see FIX for MediaWiki 1.14.x for fix to code below.

Installation

 * 1) Copy the code below and paste it into a new file called "MagicNoCache.php" in your extensions directory
 * 2) Append the following line to the end of your LocalSettings.php file: