Profile_list::blowNoticeStreamCache

This commit is contained in:
Shashi Gowda 2011-04-14 00:38:21 +05:30 committed by Zach Copley
parent 53af608ef8
commit 82f90ad756
1 changed files with 17 additions and 0 deletions

View File

@ -470,6 +470,23 @@ class Profile_list extends Memcached_DataObject
return $count;
}
/**
* get the cached number of profiles subscribed to this
* people tag, re-count if the argument is true.
*
* @param boolean $recount whether to ignore cache
*
* @return integer count
*/
function blowNoticeStreamCache($all=false)
{
self::blow('profile_list:notice_ids:%d', $this->id);
if ($all) {
self::blow('profile_list:notice_ids:%d;last', $this->id);
}
}
/**
* get the Profile_list object by the
* given tagger and with given tag