From 2eeb4dc126d4b3e8314910916475fd0941c26577 Mon Sep 17 00:00:00 2001 From: Ilyas Salikhov Date: Sun, 18 May 2014 23:34:43 +0400 Subject: [PATCH] additional tags for memcache --- Cache/Memcache.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Cache/Memcache.php b/Cache/Memcache.php index ea93741..1137fd3 100644 --- a/Cache/Memcache.php +++ b/Cache/Memcache.php @@ -6,6 +6,7 @@ class Memcache extends \Memcache { protected $stopwatch; + protected $stopwatchAdditionalTags = array(); protected $serverName; public function addWatchedServer( @@ -22,9 +23,14 @@ public function setStopwatch(Stopwatch $stopwatch) $this->stopwatch = $stopwatch; } - public function getStopwatchEvent($methodName) + public function setStopwatchTags(array $tags) { - $tags = array(); + $this->stopwatchAdditionalTags = $tags; + } + + protected function getStopwatchEvent($methodName) + { + $tags = $this->stopwatchAdditionalTags; $v = explode('::', $methodName); if (sizeof($v) > 1) {