3 class TagNoticeStream extends CachingNoticeStream
5 function __construct($tag)
7 parent::__construct(new RawTagNoticeStream($tag),
8 'notice_tag:notice_ids:' . Cache::keyize($tag));
12 class RawTagNoticeStream extends NoticeStream
16 function __construct($tag)
21 function getNoticeIds($offset, $limit, $since_id, $max_id)
23 $nt = new Notice_tag();
25 $nt->tag = $this->tag;
28 $nt->selectAdd('notice_id');
30 Notice::addWhereSinceId($nt, $since_id, 'notice_id');
31 Notice::addWhereMaxId($nt, $max_id, 'notice_id');
33 $nt->orderBy('created DESC, notice_id DESC');
35 if (!is_null($offset)) {
36 $nt->limit($offset, $limit);
42 while ($nt->fetch()) {
43 $ids[] = $nt->notice_id;