From ff1bd769ef59ef78eaa06105f1af4bed12acc974 Mon Sep 17 00:00:00 2001 From: Timo Tijhof Date: Wed, 2 Dec 2015 15:47:05 +0000 Subject: [PATCH] objectcache: Add $holdoff parameter to WANObjectCache::touchCheckKey() Change-Id: I14b6d7660b34271826b77875c660c34343712648 --- includes/libs/objectcache/WANObjectCache.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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; } /** -- 2.20.1