From a319b40c97c2fd6527eeb81d7d2f2d703756ef80 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 6 Sep 2010 10:07:43 -0400 Subject: common_cache_key() -> Cache::key() --- classes/Profile.php | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'classes/Profile.php') diff --git a/classes/Profile.php b/classes/Profile.php index 19564408c..230b3aa3a 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -432,7 +432,7 @@ class Profile extends Memcached_DataObject $c = Cache::instance(); if (!empty($c)) { - $cnt = $c->get(common_cache_key('profile:subscription_count:'.$this->id)); + $cnt = $c->get(Cache::key('profile:subscription_count:'.$this->id)); if (is_integer($cnt)) { return (int) $cnt; } @@ -446,7 +446,7 @@ class Profile extends Memcached_DataObject $cnt = ($cnt > 0) ? $cnt - 1 : $cnt; if (!empty($c)) { - $c->set(common_cache_key('profile:subscription_count:'.$this->id), $cnt); + $c->set(Cache::key('profile:subscription_count:'.$this->id), $cnt); } return $cnt; @@ -456,7 +456,7 @@ class Profile extends Memcached_DataObject { $c = Cache::instance(); if (!empty($c)) { - $cnt = $c->get(common_cache_key('profile:subscriber_count:'.$this->id)); + $cnt = $c->get(Cache::key('profile:subscriber_count:'.$this->id)); if (is_integer($cnt)) { return (int) $cnt; } @@ -468,7 +468,7 @@ class Profile extends Memcached_DataObject $cnt = (int) $sub->count('distinct subscriber'); if (!empty($c)) { - $c->set(common_cache_key('profile:subscriber_count:'.$this->id), $cnt); + $c->set(Cache::key('profile:subscriber_count:'.$this->id), $cnt); } return $cnt; @@ -478,7 +478,7 @@ class Profile extends Memcached_DataObject { $c = Cache::instance(); if (!empty($c)) { - $cnt = $c->get(common_cache_key('profile:fave_count:'.$this->id)); + $cnt = $c->get(Cache::key('profile:fave_count:'.$this->id)); if (is_integer($cnt)) { return (int) $cnt; } @@ -489,7 +489,7 @@ class Profile extends Memcached_DataObject $cnt = (int) $faves->count('distinct notice_id'); if (!empty($c)) { - $c->set(common_cache_key('profile:fave_count:'.$this->id), $cnt); + $c->set(Cache::key('profile:fave_count:'.$this->id), $cnt); } return $cnt; @@ -500,7 +500,7 @@ class Profile extends Memcached_DataObject $c = Cache::instance(); if (!empty($c)) { - $cnt = $c->get(common_cache_key('profile:notice_count:'.$this->id)); + $cnt = $c->get(Cache::key('profile:notice_count:'.$this->id)); if (is_integer($cnt)) { return (int) $cnt; } @@ -511,7 +511,7 @@ class Profile extends Memcached_DataObject $cnt = (int) $notices->count('distinct id'); if (!empty($c)) { - $c->set(common_cache_key('profile:notice_count:'.$this->id), $cnt); + $c->set(Cache::key('profile:notice_count:'.$this->id), $cnt); } return $cnt; @@ -521,7 +521,7 @@ class Profile extends Memcached_DataObject { $c = Cache::instance(); if (!empty($c)) { - $c->delete(common_cache_key('profile:subscriber_count:'.$this->id)); + $c->delete(Cache::key('profile:subscriber_count:'.$this->id)); } } @@ -529,7 +529,7 @@ class Profile extends Memcached_DataObject { $c = Cache::instance(); if (!empty($c)) { - $c->delete(common_cache_key('profile:subscription_count:'.$this->id)); + $c->delete(Cache::key('profile:subscription_count:'.$this->id)); } } @@ -537,7 +537,7 @@ class Profile extends Memcached_DataObject { $c = Cache::instance(); if (!empty($c)) { - $c->delete(common_cache_key('profile:fave_count:'.$this->id)); + $c->delete(Cache::key('profile:fave_count:'.$this->id)); } } @@ -545,7 +545,7 @@ class Profile extends Memcached_DataObject { $c = Cache::instance(); if (!empty($c)) { - $c->delete(common_cache_key('profile:notice_count:'.$this->id)); + $c->delete(Cache::key('profile:notice_count:'.$this->id)); } } -- cgit v1.2.3-54-g00ecf