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();
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'));
- }
$profile = $this->getProfile();
- $profile->blowFaveCount();
+ $profile->blowFavesCache();
}
function getSelfTags()