From: Timo Tijhof Date: Wed, 2 Dec 2015 15:47:05 +0000 (+0000) Subject: objectcache: Add $holdoff parameter to WANObjectCache::touchCheckKey() X-Git-Tag: 1.31.0-rc.0~8837^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=ff1bd769ef59ef78eaa06105f1af4bed12acc974;p=lhc%2Fweb%2Fwiklou.git objectcache: Add $holdoff parameter to WANObjectCache::touchCheckKey() Change-Id: I14b6d7660b34271826b77875c660c34343712648 --- diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 1c900cde20..21d6885118 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -560,17 +560,18 @@ class WANObjectCache implements IExpiringStore, LoggerAwareInterface { * @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; } /**