cache the scope for null profile

This commit is contained in:
Evan Prodromou 2011-04-10 19:19:10 -04:00
parent 91e5a72609
commit 7c62835900

View File

@ -2305,7 +2305,11 @@ class Notice extends Memcached_DataObject
*/
function inScope($profile)
{
if (is_null($profile)) {
$keypart = sprintf('notice:in-scope-for:%d:null', $this->id);
} else {
$keypart = sprintf('notice:in-scope-for:%d:%d', $this->id, $profile->id);
}
$result = self::cacheGet($keypart);