From b9568e64d9c2cd9050839d4d4cbb3bba0490fdc3 Mon Sep 17 00:00:00 2001 From: Andrew Green Date: Mon, 17 Oct 2016 10:21:08 -0500 Subject: [PATCH] objectcache: Use constant for $ttl param default in WANObjectCache::set() Change-Id: I3f936088cd63af4d535d7f46fe5619e8bb866999 --- includes/libs/objectcache/WANObjectCache.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index bed7965149..c9982d7db3 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -525,7 +525,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @param string $key Cache key * @param mixed $value * @param int $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 @@ -554,7 +554,7 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @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 = $this->getCurrentTime(); $lockTSE = $opts['lockTSE'] ?? self::TSE_NONE; $staleTTL = $opts['staleTTL'] ?? self::STALE_TTL_NONE; -- 2.20.1