From 82f90ad75649e4aa0943e2dcf90d2a7bdc7f52c4 Mon Sep 17 00:00:00 2001 From: Shashi Gowda Date: Thu, 14 Apr 2011 00:38:21 +0530 Subject: [PATCH] Profile_list::blowNoticeStreamCache --- classes/Profile_list.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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