AndyRussG has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/316371

Change subject: WANObjectCache::set(): Use constant for $ttl param default
......................................................................

WANObjectCache::set(): Use constant for $ttl param default

Change-Id: I3f936088cd63af4d535d7f46fe5619e8bb866999
---
M includes/libs/objectcache/WANObjectCache.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/71/316371/1

diff --git a/includes/libs/objectcache/WANObjectCache.php 
b/includes/libs/objectcache/WANObjectCache.php
index e7c4edb..b4204d9 100644
--- a/includes/libs/objectcache/WANObjectCache.php
+++ b/includes/libs/objectcache/WANObjectCache.php
@@ -395,7 +395,7 @@
         * @param string $key Cache key
         * @param mixed $value
         * @param integer $ttl Seconds to live. Special values are:
-        *   - WANObjectCache::TTL_INDEFINITE: Cache forever
+        *   - WANObjectCache::TTL_INDEFINITE: Cache forever (default)
         * @param array $opts Options map:
         *   - lag : Seconds of replica DB lag. Typically, this is either the 
replica DB lag
         *      before the data was read or, if applicable, the replica DB lag 
before
@@ -423,7 +423,8 @@
         * @note Options added in 1.28: staleTTL
         * @return bool Success
         */
-       final public function set( $key, $value, $ttl = 0, array $opts = [] ) {
+       final public function set( $key, $value, $ttl = self::TTL_INDEFINITE, 
array $opts = [] ) {
+
                $now = microtime( true );
                $lockTSE = isset( $opts['lockTSE'] ) ? $opts['lockTSE'] : 
self::TSE_NONE;
                $age = isset( $opts['since'] ) ? max( 0, $now - $opts['since'] 
) : 0;

-- 
To view, visit https://gerrit.wikimedia.org/r/316371
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3f936088cd63af4d535d7f46fe5619e8bb866999
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: AndyRussG <andrew.green...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to