fix caching of faves by own, other

This commit is contained in:
Evan Prodromou 2009-07-05 11:32:57 -04:00
parent eedfaa7d1a
commit ac361791c4
2 changed files with 3 additions and 1 deletions

View File

@ -42,7 +42,7 @@ class Fave extends Memcached_DataObject
$ids = Notice::stream(array('Fave', '_streamDirect'),
array($user_id, $own),
($own) ? 'fave:ids_by_user_own:'.$user_id :
'fave:by_user:'.$user_id,
'fave:ids_by_user:'.$user_id,
$offset, $limit);
return $ids;
}

View File

@ -491,6 +491,8 @@ class User extends Memcached_DataObject
// ;last cache, too
$cache->delete(common_cache_key('fave:ids_by_user:'.$this->id));
$cache->delete(common_cache_key('fave:ids_by_user:'.$this->id.';last'));
$cache->delete(common_cache_key('fave:ids_by_user_own:'.$this->id));
$cache->delete(common_cache_key('fave:ids_by_user_own:'.$this->id.';last'));
}
}