r79942 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r79941‎ | r79942 | r79943 >
Date:18:08, 10 January 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
* (bug 26650) Remove $wgAPICacheHelp in favour of $wgAPICacheHelpTimeout
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/api/ApiMain.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiMain.php
@@ -811,20 +811,20 @@
812812 * Override the parent to generate help messages for all available modules.
813813 */
814814 public function makeHelpMsg() {
815 - global $wgMemc, $wgAPICacheHelp, $wgAPICacheHelpTimeout;
 815+ global $wgMemc, $wgAPICacheHelpTimeout;
816816 $this->setHelp();
817817 // Get help text from cache if present
818818 $key = wfMemcKey( 'apihelp', $this->getModuleName(),
819819 SpecialVersion::getVersion( 'nodb' ) .
820820 $this->getMain()->getShowVersions() );
821 - if ( $wgAPICacheHelp ) {
 821+ if ( $wgAPICacheHelpTimeout > 0 ) {
822822 $cached = $wgMemc->get( $key );
823823 if ( $cached ) {
824824 return $cached;
825825 }
826826 }
827827 $retval = $this->reallyMakeHelpMsg();
828 - if ( $wgAPICacheHelp ) {
 828+ if ( $wgAPICacheHelpTimeout > 0 ) {
829829 $wgMemc->set( $key, $retval, $wgAPICacheHelpTimeout );
830830 }
831831 return $retval;
Index: trunk/phase3/includes/DefaultSettings.php
@@ -5037,15 +5037,8 @@
50385038 $wgAPIRequestLog = false;
50395039
50405040 /**
5041 - * Cache the API help text for up to an hour. Disable this during API
5042 - * debugging and development
 5041+ * Set the timeout for the API help text cache. If set to 0, caching disabled
50435042 */
5044 -$wgAPICacheHelp = true;
5045 -
5046 -/**
5047 - * Set the timeout for the API help text cache. Ignored if $wgAPICacheHelp
5048 - * is false.
5049 - */
50505043 $wgAPICacheHelpTimeout = 60*60;
50515044
50525045 /**
Index: trunk/phase3/RELEASE-NOTES
@@ -33,6 +33,8 @@
3434 Note that this feature should reduce parser cache fragmentation when enabled.
3535 * $wgMaxUploadSize may now be set to an array to specify the upload size limit
3636 per upload type.
 37+* $wgAPICacheHelp added in 1.16 is now removed. To disable API help caching, set
 38+ $wgAPICacheHelpTimeout = 0;
3739
3840 === New features in 1.18 ===
3941 * Added a special page, disabled by default, that allows users with the
@@ -93,6 +95,7 @@
9496 * (bug 26483) add a iwtitles param to prop=iwlinks
9597 * (bug 26484) add a lltitles param to prop=langlinks
9698 * (bug 26480) add a pppageprops param to prop=pageprops
 99+* (bug 26650) Remove $wgAPICacheHelp in favour of $wgAPICacheHelpTimeout
97100
98101 === Languages updated in 1.18 ===
99102

Comments

#Comment by Reedy (talk | contribs)   19:44, 10 January 2011

Seems to merge fine into 1.17 bar release notes (though, that isn't much of a surprise)

Upto Roan if he wants to merge it back

#Comment by Catrope (talk | contribs)   20:18, 10 January 2011

No compelling reason IMO, untagging 1.17.

Status & tagging log