+
+ if ($max_id != 0) {
+ $nt->whereAdd('notice_id < ' . $max_id);
+ }
+
+ if (!is_null($since)) {
+ $nt->whereAdd('created > \'' . date('Y-m-d H:i:s', $since) . '\'');
+ }
+
+ $nt->orderBy('notice_id DESC');
+
+ if (!is_null($offset)) {
+ $nt->limit($offset, $limit);
+ }
+
+ $ids = array();
+
+ if ($nt->find()) {
+ while ($nt->fetch()) {
+ $ids[] = $nt->notice_id;
+ }
+ }
+
+ return $ids;
+ }
+
+ function blowCache($blowLast=false)
+ {
+ self::blow('notice_tag:notice_ids:%s', common_keyize($this->tag));
+ if ($blowLast) {
+ self::blow('notice_tag:notice_ids:%s;last', common_keyize($this->tag));
+ }
+ }
+
+ function pkeyGet($kv)
+ {
+ return Memcached_DataObject::pkeyGet('Notice_tag', $kv);