objectcache: Rename WANObjectCache TTL_NONE to TTL_INDEFINITE
authorTimo Tijhof <krinklemail@gmail.com>
Tue, 13 Oct 2015 15:15:36 +0000 (11:15 -0400)
committerTimo Tijhof <krinklemail@gmail.com>
Wed, 14 Oct 2015 21:08:59 +0000 (17:08 -0400)
"None" has a somewhat unobvious meaning, also ambiguous with "uncachable".

Change-Id: I799de385427aeb8f581d51800606552bdc998252

includes/cache/MessageCache.php
includes/libs/objectcache/WANObjectCache.php

index ef70589..09e9077 100644 (file)
@@ -675,7 +675,7 @@ class MessageCache {
                                'hash' => $cache['HASH'],
                                'latest' => isset( $cache['LATEST'] ) ? $cache['LATEST'] : 0
                        ),
-                       WANObjectCache::TTL_NONE
+                       WANObjectCache::TTL_INDEFINITE
                );
        }
 
index 71c8a93..3b9c832 100644 (file)
@@ -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: