summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorBrion Vibber <brion@pobox.com>2010-03-15 14:39:14 -0700
committerBrion Vibber <brion@pobox.com>2010-03-15 14:39:14 -0700
commit2b684f695447ce9839c04ca4ea6144bc87e63209 (patch)
treece2e4cf5dd42fa39905b9c1c6e069faf9eb8d2b1 /classes
parentc89e1865f7250341c8b5e7878715d5a693a0e6aa (diff)
parentcb471e0c96143c780c14e0864d70879a6308206e (diff)
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'classes')
-rw-r--r--classes/Notice.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index a704053a0..f7194e339 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -119,6 +119,9 @@ class Notice extends Memcached_DataObject
// NOTE: we don't clear queue items
$result = parent::delete();
+
+ $this->blowOnDelete();
+ return $result;
}
/**
@@ -421,6 +424,18 @@ class Notice extends Memcached_DataObject
$profile->blowNoticeCount();
}
+ /**
+ * Clear cache entries related to this notice at delete time.
+ * Necessary to avoid breaking paging on public, profile timelines.
+ */
+ function blowOnDelete()
+ {
+ $this->blowOnInsert();
+
+ self::blow('profile:notice_ids:%d;last', $this->profile_id);
+ self::blow('public;last');
+ }
+
/** save all urls in the notice to the db
*
* follow redirects and save all available file information
@@ -589,7 +604,6 @@ class Notice extends Memcached_DataObject
array(),
'public',
$offset, $limit, $since_id, $max_id);
-
return Notice::getStreamByIds($ids);
}