summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@controlyourself.ca>2008-09-22 15:09:37 -0400
committerEvan Prodromou <evan@controlyourself.ca>2008-09-22 15:09:37 -0400
commite24425d44ea6416f6d20add0e1e872fb23ff5214 (patch)
treeec9ba5c634494dcea868bd21d0fea85c90d0fb2a /classes
parentd73ed53535845af2ed0c731f9dbf7997ec470536 (diff)
correct a couple of bugs
darcs-hash:20080922190937-5ed1f-9439cd9cff178323ac1445f33e2520260b4b267e.gz
Diffstat (limited to 'classes')
-rw-r--r--classes/User.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/classes/User.php b/classes/User.php
index 1168406ef..fcae38c09 100644
--- a/classes/User.php
+++ b/classes/User.php
@@ -149,6 +149,16 @@ class User extends DB_DataObject
}
function noticesWithFriends($offset=0, $limit=20) {
+
+ # We clearly need a more elegant way to make this work.
+
+ if (common_config('memcached', 'enabled')) {
+ if ($offset + $limit <= WITHFRIENDS_CACHE_WINDOW) {
+ $cached = $this->noticesWithFriendsWindow();
+ $wrapper = new NoticeWrapper(array_slice($cached, $offset, $limit));
+ return $wrapper;
+ }
+ }
$notice = new Notice();