From: Evan Prodromou Date: Sun, 10 Apr 2011 23:19:10 +0000 (-0400) Subject: cache the scope for null profile X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7c62835900af3caeac92b81eec8e76748c47882e;p=quix0rs-gnu-social.git cache the scope for null profile --- diff --git a/classes/Notice.php b/classes/Notice.php index 0f2006e143..de45bdaae1 100644 --- a/classes/Notice.php +++ b/classes/Notice.php @@ -2305,7 +2305,11 @@ class Notice extends Memcached_DataObject */ function inScope($profile) { - $keypart = sprintf('notice:in-scope-for:%d:%d', $this->id, $profile->id); + 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);