summaryrefslogtreecommitdiff
path: root/classes/Notice.php
diff options
context:
space:
mode:
authorSarven Capadisli <csarven@controlyourself.ca>2009-05-05 22:54:46 +0000
committerSarven Capadisli <csarven@controlyourself.ca>2009-05-05 22:54:46 +0000
commitaaeed091d23a0d2f969578dd95ead8df4ea7eb11 (patch)
treef6693acebba5373eb1f0b2c75dfa5f969e0ddb5b /classes/Notice.php
parent51377258a1660fee02a3f92436dc40ee40f2a88d (diff)
parent0bbf56f6dc1acb448594f21334f610229c4c76bd (diff)
Merge branch '0.7.x' into 0.8.x
Diffstat (limited to 'classes/Notice.php')
-rw-r--r--classes/Notice.php23
1 files changed, 10 insertions, 13 deletions
diff --git a/classes/Notice.php b/classes/Notice.php
index 19ae8313c..382d160ab 100644
--- a/classes/Notice.php
+++ b/classes/Notice.php
@@ -308,9 +308,9 @@ class Notice extends Memcached_DataObject
$group_inbox->notice_id = $this->id;
if ($group_inbox->find()) {
while ($group_inbox->fetch()) {
- $cache->delete(common_cache_key('group:notices:'.$group_inbox->group_id));
+ $cache->delete(common_cache_key('user_group:notice_ids:' . $group_inbox->group_id));
if ($blowLast) {
- $cache->delete(common_cache_key('group:notices:'.$group_inbox->group_id.';last'));
+ $cache->delete(common_cache_key('user_group:notice_ids:' . $group_inbox->group_id.';last'));
}
$member = new Group_member();
$member->group_id = $group_inbox->group_id;
@@ -337,10 +337,7 @@ class Notice extends Memcached_DataObject
$tag->notice_id = $this->id;
if ($tag->find()) {
while ($tag->fetch()) {
- $cache->delete(common_cache_key('notice_tag:notice_stream:' . $tag->tag));
- if ($blowLast) {
- $cache->delete(common_cache_key('notice_tag:notice_stream:' . $tag->tag . ';last'));
- }
+ $tag->blowCache($blowLast);
}
}
$tag->free();
@@ -375,10 +372,10 @@ class Notice extends Memcached_DataObject
{
if ($this->is_local) {
$cache = common_memcache();
- if ($cache) {
- $cache->delete(common_cache_key('profile:notices:'.$this->profile_id));
+ if (!empty($cache)) {
+ $cache->delete(common_cache_key('profile:notice_ids:'.$this->profile_id));
if ($blowLast) {
- $cache->delete(common_cache_key('profile:notices:'.$this->profile_id.';last'));
+ $cache->delete(common_cache_key('profile:notice_ids:'.$this->profile_id.';last'));
}
}
}
@@ -392,9 +389,9 @@ class Notice extends Memcached_DataObject
$reply->notice_id = $this->id;
if ($reply->find()) {
while ($reply->fetch()) {
- $cache->delete(common_cache_key('user:replies:'.$reply->profile_id));
+ $cache->delete(common_cache_key('reply:stream:'.$reply->profile_id));
if ($blowLast) {
- $cache->delete(common_cache_key('user:replies:'.$reply->profile_id.';last'));
+ $cache->delete(common_cache_key('reply:stream:'.$reply->profile_id.';last'));
}
}
}
@@ -424,9 +421,9 @@ class Notice extends Memcached_DataObject
$fave->notice_id = $this->id;
if ($fave->find()) {
while ($fave->fetch()) {
- $cache->delete(common_cache_key('user:faves:'.$fave->user_id));
+ $cache->delete(common_cache_key('fave:ids_by_user:'.$fave->user_id));
if ($blowLast) {
- $cache->delete(common_cache_key('user:faves:'.$fave->user_id.';last'));
+ $cache->delete(common_cache_key('fave:ids_by_user:'.$fave->user_id.';last'));
}
}
}