Don't cache user-specific information for Notice atom entries

This commit is contained in:
Evan Prodromou
2010-12-08 07:25:55 -05:00
parent 4b4b763255
commit b8b5b87c4c
2 changed files with 86 additions and 74 deletions

View File

@@ -327,16 +327,8 @@ class Activity
return null;
}
function asString($namespace=false, $author=true)
function asString($namespace=false, $author=true, $source=false)
{
$c = Cache::instance();
$str = $c->get(Cache::codeKey('activity:as-string:'.$this->id));
if (!empty($str)) {
return $str;
}
$xs = new XMLStringer(true);
if ($namespace) {
@@ -502,7 +494,7 @@ class Activity
// Info on the source feed
if (!empty($this->source)) {
if ($source && !empty($this->source)) {
$xs->elementStart('source');
$xs->element('id', null, $this->source->id);
@@ -559,8 +551,6 @@ class Activity
$str = $xs->getString();
$c->set(Cache::codeKey('activity:as-string:'.$this->id), $str);
return $str;
}