Merge "Fix relayPurge() IDEA warnings"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 2 Dec 2015 22:41:43 +0000 (22:41 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 2 Dec 2015 22:41:43 +0000 (22:41 +0000)
1  2 
includes/libs/objectcache/WANObjectCache.php

@@@ -560,18 -560,17 +560,18 @@@ class WANObjectCache implements IExpiri
         * @see WANObjectCache::resetCheckKey()
         *
         * @param string $key Cache key
 +       * @param int $holdoff HOLDOFF_TTL or HOLDOFF_NONE constant
         * @return bool True if the item was purged or not found, false on failure
         */
 -      final public function touchCheckKey( $key ) {
 +      final public function touchCheckKey( $key, $holdoff = self::HOLDOFF_TTL ) {
                $key = self::TIME_KEY_PREFIX . $key;
                // Update the local datacenter immediately
                $ok = $this->cache->set( $key,
 -                      $this->makePurgeValue( microtime( true ), self::HOLDOFF_TTL ),
 +                      $this->makePurgeValue( microtime( true ), $holdoff ),
                        self::CHECK_KEY_TTL
                );
                // Publish the purge to all datacenters
 -              return $this->relayPurge( $key, self::CHECK_KEY_TTL, self::HOLDOFF_TTL ) && $ok;
 +              return $this->relayPurge( $key, self::CHECK_KEY_TTL, $holdoff ) && $ok;
        }
  
        /**
         *
         * @param string $key Cache key
         * @param integer $ttl How long to keep the tombstone [seconds]
-        * @param holdoff $ttl HOLDOFF_* constant controlling how long to ignore sets for this key
+        * @param integer $holdoff HOLDOFF_* constant controlling how long to ignore sets for this key
         * @return bool Success
         */
        protected function relayPurge( $key, $ttl, $holdoff ) {