From: Shashi Gowda Date: Wed, 13 Apr 2011 19:08:21 +0000 (+0530) Subject: Profile_list::blowNoticeStreamCache X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=82f90ad75649e4aa0943e2dcf90d2a7bdc7f52c4;p=quix0rs-gnu-social.git Profile_list::blowNoticeStreamCache --- diff --git a/classes/Profile_list.php b/classes/Profile_list.php index cf0a255e75..7de1d15730 100644 --- a/classes/Profile_list.php +++ b/classes/Profile_list.php @@ -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