- function blowRecentNoticeScope() {
- $notice = $this->getNotices(0, CachingNoticeStream::CACHE_WINDOW);
- while ($notice->fetch()) {
- self::blow(sprintf('notice:in-scope-for:%d:null', $notice->id));
- }
+ function flushVisibility()
+ {
+ // Get all notices
+ $stream = new ProfileNoticeStream($this, $this);
+ $ids = $stream->getNoticeIds(0, CachingNoticeStream::CACHE_WINDOW);
+ foreach ($ids as $id) {
+ self::blow('notice:in-scope-for:%d:null', $id);
+ }