summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-12-08 07:25:55 -0500
committerEvan Prodromou <evan@status.net>2010-12-08 13:59:12 -0500
commit94ff04e1903cf3a544e52e64846538dee5f23fb3 (patch)
treec8a600b20511fc141709a3eaa73d5dc676722e0a /lib
parentdb519d3ffbb54526ed0791f314b39325422d3f15 (diff)
Don't cache user-specific information for Notice atom entries
Diffstat (limited to 'lib')
-rw-r--r--lib/activity.php14
1 files changed, 2 insertions, 12 deletions
diff --git a/lib/activity.php b/lib/activity.php
index d3eeadcee..c3a984a7b 100644
--- a/lib/activity.php
+++ b/lib/activity.php
@@ -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;
}