X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fcache.php;h=eb4eb666567a9f21bf7b51e53c09bdf2a9390dd4;hb=8aacc4b84af5154749f4b0758f41cb705350f704;hp=dc667654ab6ef327e8a022ae1b13d7612ecfa1b2;hpb=001512df966c8c3b8f045f645e804b0a6fef8625;p=quix0rs-gnu-social.git diff --git a/lib/cache.php b/lib/cache.php index dc667654ab..eb4eb66656 100644 --- a/lib/cache.php +++ b/lib/cache.php @@ -80,7 +80,7 @@ class Cache $base_key = common_config('cache', 'base'); if (empty($base_key)) { - $base_key = common_keyize(common_config('site', 'name')); + $base_key = self::keyize(common_config('site', 'name')); } return 'statusnet:' . $base_key . ':' . $extra; @@ -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]);