For MediaWiki (recent comments | status changes | tags | authors | states | release notes)
559 succeeded tests.
Index: trunk/phase3/includes/api/ApiMain.php =================================================================== --- trunk/phase3/includes/api/ApiMain.php (revision 56090) +++ trunk/phase3/includes/api/ApiMain.php (revision 56091) @@ -555,15 +555,19 @@ * Override the parent to generate help messages for all available modules. */ public function makeHelpMsg() { - global $wgMemc; + global $wgMemc, $wgAPICacheHelp; $this->mPrinter->setHelp(); // Get help text from cache if present - $key = wfMemcKey( 'apihelp', $this->getModuleName() ); - $cached = $wgMemc->get( $key ); - if ( $cached ) - return $cached; + $key = wfMemcKey( 'apihelp', $this->getModuleName(), + SpecialVersion::getVersion( 'nodb' ) ); + if ( $wgAPICacheHelp ) { + $cached = $wgMemc->get( $key ); + if ( $cached ) + return $cached; + } $retval = $this->reallyMakeHelpMsg(); - $wgMemc->set( $key, $retval, 60*60 ); + if ( $wgAPICacheHelp ) + $wgMemc->set( $key, $retval, 60*60 ); return $retval; } Index: trunk/phase3/includes/DefaultSettings.php =================================================================== --- trunk/phase3/includes/DefaultSettings.php (revision 56090) +++ trunk/phase3/includes/DefaultSettings.php (revision 56091) @@ -3846,6 +3846,12 @@ $wgAPIRequestLog = false; /** + * Cache the API help text for up to an hour. Disable this during API + * debugging and development + */ +$wgAPICacheHelp = true; + +/** * Parser test suite files to be run by parserTests.php when no specific * filename is passed to it. *
Would recommend making the config var the cache timeout rather than just an on/off.
Looks like the caching will still fail to update if you're enabling and disabling extensions, or doing any development that doesn't alter the reported MediaWiki version.