X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcache.php;h=eb4eb666567a9f21bf7b51e53c09bdf2a9390dd4;hb=b7d07466943a73e1c009467c8daa6e499810080f;hp=8dc97a6428c5f89e39fa07c420ae899399d06697;hpb=babdc430f93a5efb17db4df0518f690d81f758d7;p=quix0rs-gnu-social.git diff --git a/lib/cache.php b/lib/cache.php index 8dc97a6428..eb4eb66656 100644 --- a/lib/cache.php +++ b/lib/cache.php @@ -164,6 +164,7 @@ class Cache { $value = false; + common_perf_counter('Cache::get', $key); if (Event::handle('StartCacheGet', array(&$key, &$value))) { if (array_key_exists($key, $this->_items)) { $value = unserialize($this->_items[$key]); @@ -188,6 +189,7 @@ class Cache { $success = false; + common_perf_counter('Cache::set', $key); if (Event::handle('StartCacheSet', array(&$key, &$value, &$flag, &$expiry, &$success))) { @@ -214,6 +216,7 @@ class Cache function increment($key, $step=1) { $value = false; + common_perf_counter('Cache::increment', $key); if (Event::handle('StartCacheIncrement', array(&$key, &$step, &$value))) { // Fallback is not guaranteed to be atomic, // and may original expiry value. @@ -239,6 +242,7 @@ class Cache { $success = false; + common_perf_counter('Cache::delete', $key); if (Event::handle('StartCacheDelete', array(&$key, &$success))) { if (array_key_exists($key, $this->_items)) { unset($this->_items[$key]);