]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Use cached query results for favorited. Might cause pagination issues.
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 22 Jan 2009 18:14:18 +0000 (19:14 +0100)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 22 Jan 2009 18:14:18 +0000 (19:14 +0100)
actions/favorited.php

index 0223564f34e754fbdc27eba4bea23d723b3d29ce..4155b3a234d22f036f16a77220ed71ea4b982cae 100644 (file)
@@ -181,10 +181,9 @@ class FavoritedAction extends Action
             $qry .= ' LIMIT ' . $offset . ', ' . $limit;
         }
 
-        // XXX: Figure out how to cache this query
-
-        $notice = new Notice;
-        $notice->query(sprintf($qry, common_config('popular', 'dropoff')));
+        $notice = Memcached_DataObject::cachedQuery('Notice',
+                                                    sprintf($qry, common_config('popular', 'dropoff')),
+                                                    600);
 
         $nl = new NoticeList($notice, $this);