diff options
author | Zach Copley <zach@status.net> | 2010-09-28 15:46:14 -0700 |
---|---|---|
committer | Zach Copley <zach@status.net> | 2010-09-29 16:35:12 -0700 |
commit | 3960c9ad39d96cdfef390065f15f9f0fc280f37c (patch) | |
tree | 48d080155b6e1836b8ac33dfb20c87ed1b534d83 /classes/Profile.php | |
parent | c19e592fa80f616a18718c4650ea0ffc9661f7ce (diff) |
Move blowFavesCache() to Profile
Diffstat (limited to 'classes/Profile.php')
-rw-r--r-- | classes/Profile.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/classes/Profile.php b/classes/Profile.php index 668f25d2e..3844077e6 100644 --- a/classes/Profile.php +++ b/classes/Profile.php @@ -551,6 +551,20 @@ class Profile extends Memcached_DataObject return $cnt; } + function blowFavesCache() + { + $cache = common_memcache(); + if ($cache) { + // Faves don't happen chronologically, so we need to blow + // ;last cache, too + $cache->delete(common_cache_key('fave:ids_by_user:'.$this->id)); + $cache->delete(common_cache_key('fave:ids_by_user:'.$this->id.';last')); + $cache->delete(common_cache_key('fave:ids_by_user_own:'.$this->id)); + $cache->delete(common_cache_key('fave:ids_by_user_own:'.$this->id.';last')); + } + $this->blowFaveCount(); + } + function blowSubscriberCount() { $c = common_memcache(); |