+ function blowStream()
+ {
+ $c = self::memcache();
+
+ if (empty($c)) {
+ return false;
+ }
+
+ $args = func_get_args();
+
+ $format = array_shift($args);
+
+ $keyPart = vsprintf($format, $args);
+
+ $cacheKey = Cache::key($keyPart);
+
+ $c->delete($cacheKey);
+
+ // delete the "last" stream, too, if this notice is
+ // older than the top of that stream
+
+ $lastKey = $cacheKey.';last';
+
+ $lastStr = $c->get($lastKey);
+
+ if ($lastStr !== false) {
+ $window = explode(',', $lastStr);
+ $lastID = $window[0];
+ $lastNotice = Notice::staticGet('id', $lastID);
+ if (empty($lastNotice) // just weird
+ || strtotime($lastNotice->created) >= strtotime($this->created)) {
+ $c->delete($lastKey);
+ }
+ }
+ }
+