Merge "Allow for dynamic TTLs in getWithSetCallback()"
[lhc/web/wiklou.git] / includes / libs / objectcache / WANObjectCache.php
index 21a09e6..0ca0f2e 100755 (executable)
@@ -74,6 +74,9 @@ class WANObjectCache {
        /** Seconds to keep lock keys around */
        const LOCK_TTL = 5;
 
+       /** Idiom for set()/getWithSetCallback() TTL */
+       const TTL_NONE = 0;
+
        /** Cache format version number */
        const VERSION = 1;
 
@@ -263,6 +266,8 @@ class WANObjectCache {
        /**
         * Fetch the value of a timestamp "check" key
         *
+        * Note that "check" keys won't collide with other regular keys
+        *
         * @param string $key
         * @return float|bool TS_UNIX timestamp of the key; false if not present
         */
@@ -283,6 +288,8 @@ class WANObjectCache {
         * avoid race conditions where dependent keys get updated with a
         * stale value (e.g. from a DB slave).
         *
+        * Note that "check" keys won't collide with other regular keys
+        *
         * @see WANObjectCache::get()
         *
         * @param string $key Cache key