* (bug 26650) Remove $wgAPICacheHelp in favour of $wgAPICacheHelpTimeout
authorSam Reed <reedy@users.mediawiki.org>
Mon, 10 Jan 2011 18:08:54 +0000 (18:08 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 10 Jan 2011 18:08:54 +0000 (18:08 +0000)
RELEASE-NOTES
includes/DefaultSettings.php
includes/api/ApiMain.php

index c107d95..b482cf2 100644 (file)
@@ -33,6 +33,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
   Note that this feature should reduce parser cache fragmentation when enabled.
 * $wgMaxUploadSize may now be set to an array to specify the upload size limit 
   per upload type.
+* $wgAPICacheHelp added in 1.16 is now removed. To disable API help caching, set
+  $wgAPICacheHelpTimeout = 0;
 
 === New features in 1.18 ===
 * Added a special page, disabled by default, that allows users with the
@@ -93,6 +95,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 26483) add a iwtitles param to prop=iwlinks
 * (bug 26484) add a lltitles param to prop=langlinks
 * (bug 26480) add a pppageprops param to prop=pageprops
+* (bug 26650) Remove $wgAPICacheHelp in favour of $wgAPICacheHelpTimeout
 
 === Languages updated in 1.18 ===
 
index a7242a7..7913683 100644 (file)
@@ -5037,14 +5037,7 @@ $wgAPIMaxUncachedDiffs = 1;
 $wgAPIRequestLog = false;
 
 /**
- * Cache the API help text for up to an hour. Disable this during API
- * debugging and development
- */
-$wgAPICacheHelp = true;
-
-/**
- * Set the timeout for the API help text cache. Ignored if $wgAPICacheHelp
- * is false.
+ * Set the timeout for the API help text cache. If set to 0, caching disabled
  */
 $wgAPICacheHelpTimeout = 60*60;
 
index eb9f055..e71c5e1 100644 (file)
@@ -811,20 +811,20 @@ class ApiMain extends ApiBase {
         * Override the parent to generate help messages for all available modules.
         */
        public function makeHelpMsg() {
-               global $wgMemc, $wgAPICacheHelp, $wgAPICacheHelpTimeout;
+               global $wgMemc, $wgAPICacheHelpTimeout;
                $this->setHelp();
                // Get help text from cache if present
                $key = wfMemcKey( 'apihelp', $this->getModuleName(),
                        SpecialVersion::getVersion( 'nodb' ) .
                        $this->getMain()->getShowVersions() );
-               if ( $wgAPICacheHelp ) {
+               if ( $wgAPICacheHelpTimeout > 0 ) {
                        $cached = $wgMemc->get( $key );
                        if ( $cached ) {
                                return $cached;
                        }
                }
                $retval = $this->reallyMakeHelpMsg();
-               if ( $wgAPICacheHelp ) {
+               if ( $wgAPICacheHelpTimeout > 0 ) {
                        $wgMemc->set( $key, $retval, $wgAPICacheHelpTimeout );
                }
                return $retval;