From 68a54d6d7a27a3fa81761814e8db92942cd0c08b Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Tue, 13 Oct 2015 11:15:36 -0400 Subject: [PATCH] objectcache: Rename WANObjectCache TTL_NONE to TTL_INDEFINITE "None" has a somewhat unobvious meaning, also ambiguous with "uncachable". Change-Id: I799de385427aeb8f581d51800606552bdc998252 --- includes/cache/MessageCache.php | 2 +- includes/libs/objectcache/WANObjectCache.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/cache/MessageCache.php b/includes/cache/MessageCache.php index ef70589f0f..09e9077468 100644 --- a/includes/cache/MessageCache.php +++ b/includes/cache/MessageCache.php @@ -675,7 +675,7 @@ class MessageCache { 'hash' => $cache['HASH'], 'latest' => isset( $cache['LATEST'] ) ? $cache['LATEST'] : 0 ), - WANObjectCache::TTL_NONE + WANObjectCache::TTL_INDEFINITE ); } diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 71c8a931a1..3b9c832be7 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -92,7 +92,7 @@ class WANObjectCache { const LOCK_TSE = 1; /** Idiom for set()/getWithSetCallback() TTL being "forever" */ - const TTL_NONE = 0; + const TTL_INDEFINITE = 0; /** Idiom for getWithSetCallback() callbacks to avoid calling set() */ const TTL_UNCACHEABLE = -1; /** Idiom for getWithSetCallback() callbacks to 'lockTSE' logic */ @@ -633,7 +633,7 @@ class WANObjectCache { * * @param string $key Cache key * @param integer $ttl Seconds to live for key updates. Special values are: - * - WANObjectCache::TTL_NONE : Cache forever + * - WANObjectCache::TTL_INDEFINITE: Cache forever * - WANObjectCache::TTL_UNCACHEABLE: Do not cache at all * @param callable $callback Value generation function * @param array $opts Options map: -- 2.20.1