Lower CDN cache TTL when slave lag is high
[lhc/web/wiklou.git] / includes / DefaultSettings.php
index 802229e..3153afb 100644 (file)
@@ -75,7 +75,7 @@ $wgConfigRegistry = array(
  * MediaWiki version number
  * @since 1.2
  */
-$wgVersion = '1.26alpha';
+$wgVersion = '1.27alpha';
 
 /**
  * Name of the site. It must be changed in LocalSettings.php
@@ -525,6 +525,14 @@ $wgForeignFileRepos = array();
  */
 $wgUseInstantCommons = false;
 
+/**
+ * Name of the remote repository to which users will be allowed to upload
+ * files in their editors. Used to find a set of message names to describe
+ * the legal requirements for uploading to that wiki, and suggestions for
+ * when those requirements are not met.
+ */
+$wgRemoteUploadTarget = 'default';
+
 /**
  * File backend structure configuration.
  *
@@ -1860,6 +1868,32 @@ $wgDBservers = false;
  */
 $wgLBFactoryConf = array( 'class' => 'LBFactorySimple' );
 
+/**
+ * The ID of the current data center
+ * @since 1.27
+ */
+$wgDataCenterId = 'default';
+
+/**
+ * Map of data center IDs to their role ("master" or "slave")
+ *
+ * Multiple data centers can be setup to handle MediaWiki, with HTTP
+ * POSTs routed to the master data center and GET/HEAD/OPTION routed to
+ * any data center (usually the closest to the end user). In such setups,
+ * this setting should be set to the appropriate value in the site
+ * config for each data center.
+ * @since 1.27
+ */
+$wgDataCenterRoles = array( 'default' => 'master' );
+
+/**
+ * After a state-changing request is done by a client, this determines
+ * how many seconds that client should keep using the master datacenter.
+ * This avoids unexpected stale or 404 responses due to replication lag.
+ * @since 1.27
+ */
+$wgDataCenterUpdateStickTTL = 10;
+
 /**
  * File to log database errors to
  */
@@ -2533,14 +2567,21 @@ $wgVaryOnXFP = false;
 $wgInternalServer = false;
 
 /**
- * Cache timeout for the squid, will be sent as s-maxage (without ESI) or
- * Surrogate-Control (with ESI). Without ESI, you should strip out s-maxage in
- * the Squid config.
+ * Cache TTL for the CDN sent as s-maxage (without ESI) or
+ * Surrogate-Control (with ESI). Without ESI, you should strip
+ * out s-maxage in the Squid config.
  *
-* 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
+ * 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days.
  */
 $wgSquidMaxage = 18000;
 
+/**
+ * Cache timeout for the CDN when DB slave lag is high
+ * @see $wgSquidMaxage
+ * @since 1.27
+ */
+$wgCdnMaxageLagged = 30;
+
 /**
  * Default maximum age for raw CSS/JS accesses
  *
@@ -3515,6 +3556,8 @@ $wgResourceLoaderDebug = false;
 /**
  * Put each statement on its own line when minifying JavaScript. This makes
  * debugging in non-debug mode a bit easier.
+ *
+ * @deprecated since 1.27: Always false; no longer configurable.
  */
 $wgResourceLoaderMinifierStatementsOnOwnLine = false;
 
@@ -3522,6 +3565,8 @@ $wgResourceLoaderMinifierStatementsOnOwnLine = false;
  * Maximum line length when minifying JavaScript. This is not a hard maximum:
  * the minifier will try not to produce lines longer than this, but may be
  * forced to do so in certain cases.
+ *
+ * @deprecated since 1.27: Always 1,000; no longer configurable.
  */
 $wgResourceLoaderMinifierMaxLineLength = 1000;
 
@@ -4462,6 +4507,7 @@ $wgReservedUsernames = array(
        'msg:usermessage-editor', // Default user for leaving user messages
        'msg:proxyblocker', // For $wgProxyList and Special:Blockme (removed in 1.22)
        'msg:spambot_username', // Used by cleanupSpam.php
+       'msg:autochange-username', // Used by anon category RC entries (parser functions, Lua & purges)
 );
 
 /**
@@ -5208,6 +5254,13 @@ $wgRateLimits = array(
                'user' => null,
                'newbie' => null,
        ),
+       'purge' => array( // purging pages
+               'anon' => null,
+               'user' => null,
+               'newbie' => null,
+               'ip' => null,
+               'subnet' => null,
+       ),
 );
 
 /**
@@ -5407,13 +5460,6 @@ $wgDebugRawPage = false;
  */
 $wgDebugComments = false;
 
-/**
- * Extensive database transaction state debugging
- *
- * @since 1.20
- */
-$wgDebugDBTransactions = false;
-
 /**
  * Write SQL queries to the debug log.
  *
@@ -5424,13 +5470,6 @@ $wgDebugDBTransactions = false;
  */
 $wgDebugDumpSql = false;
 
-/**
- * Trim logged SQL queries to this many bytes. Set 0/false/null to do no
- * trimming.
- * @since 1.24
- */
-$wgDebugDumpSqlLength = 500;
-
 /**
  * Performance expectations for DB usage
  *
@@ -6664,6 +6703,7 @@ $wgHooks = array();
  */
 $wgJobClasses = array(
        'refreshLinks' => 'RefreshLinksJob',
+       'deleteLinks' => 'DeleteLinksJob',
        'htmlCacheUpdate' => 'HTMLCacheUpdateJob',
        'sendMail' => 'EmaillingJob',
        'enotifNotify' => 'EnotifNotifyJob',
@@ -7667,14 +7707,6 @@ $wgHKDFAlgorithm = 'sha256';
  */
 $wgPageLanguageUseDB = false;
 
-/**
- * Enable use of the *_namespace fields of the pagelinks, redirect, and templatelinks tables.
- * Set this only if the fields are fully populated. This may be removed in 1.25.
- * @var bool
- * @since 1.24
- */
-$wgUseLinkNamespaceDBFields = true;
-
 /**
  * Global configuration variable for Virtual REST Services.
  * Parameters for different services are to be declared inside