From 3960c9ad39d96cdfef390065f15f9f0fc280f37c Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Tue, 28 Sep 2010 15:46:14 -0700 Subject: Move blowFavesCache() to Profile --- classes/Profile.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'classes/Profile.php') 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(); -- cgit v1.2.3-54-g00ecf