For MediaWiki (recent comments | status changes | tags | authors | states | release notes | statistics)
Index: trunk/phase3/includes/api/ApiMain.php =================================================================== --- trunk/phase3/includes/api/ApiMain.php (revision 56558) +++ trunk/phase3/includes/api/ApiMain.php (revision 56559) @@ -555,7 +555,7 @@ * Override the parent to generate help messages for all available modules. */ public function makeHelpMsg() { - global $wgMemc, $wgAPICacheHelp; + global $wgMemc, $wgAPICacheHelp, $wgAPICacheHelpTimeout; $this->mPrinter->setHelp(); // Get help text from cache if present $key = wfMemcKey( 'apihelp', $this->getModuleName(), @@ -568,7 +568,7 @@ } $retval = $this->reallyMakeHelpMsg(); if ( $wgAPICacheHelp ) - $wgMemc->set( $key, $retval, 60*60 ); + $wgMemc->set( $key, $retval, $wgAPICacheHelpTimeout ); return $retval; } Index: trunk/phase3/includes/DefaultSettings.php =================================================================== --- trunk/phase3/includes/DefaultSettings.php (revision 56558) +++ trunk/phase3/includes/DefaultSettings.php (revision 56559) @@ -3881,6 +3881,12 @@ $wgAPICacheHelp = true; /** + * Set the timeout for the API help text cache. Ignored if $wgAPICacheHelp + * is false. + */ +$wgAPICacheHelpTimeout = 60*60; + +/** * Parser test suite files to be run by parserTests.php when no specific * filename is passed to it. *
Can't we go with just one variable for this?