summaryrefslogtreecommitdiff
path: root/classes/Profile.php
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-09-06 10:07:43 -0400
committerEvan Prodromou <evan@status.net>2010-09-06 10:07:43 -0400
commita319b40c97c2fd6527eeb81d7d2f2d703756ef80 (patch)
tree19f849d8abddc24b609d33a5710efb97b37a972f /classes/Profile.php
parente42d2124a319e72f949fa354cc75252f32a5a6c5 (diff)
common_cache_key() -> Cache::key()
Diffstat (limited to 'classes/Profile.php')
-rw-r--r--classes/Profile.php24
1 files changed, 12 insertions, 12 deletions
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));
}
}