diff options
author | Evan Prodromou <evan@status.net> | 2010-03-17 09:38:39 -0500 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-03-17 09:38:39 -0500 |
commit | 4761c07ad8d76f7c34d4db53d32d15e806ba1e88 (patch) | |
tree | eb3d78ccde1778037165c92b6ec36c7465b54345 /classes/Notice.php | |
parent | f21f78364a9cbde2ca535a3983b384707ad097ae (diff) | |
parent | f62b8a80cf33ac8529d0736c51dc060a9d235369 (diff) |
Merge branch 'testing' of git@gitorious.org:statusnet/mainline into testing
Diffstat (limited to 'classes/Notice.php')
-rw-r--r-- | classes/Notice.php | 16 |
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); } |