summaryrefslogtreecommitdiffstats
path: root/web/template/stats
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2009-01-04 20:43:58 +0100
committerLoui Chang <louipc.ist@gmail.com>2009-01-08 17:48:58 +0100
commit5d6f465170392861c0438723fa98efd4732d30ec (patch)
treea4b8b2556f2fce6e464322107ceacd24483b8f98 /web/template/stats
parent92643bb8278f3f17d55e1e6c37210ddacb957dae (diff)
downloadaur-5d6f465170392861c0438723fa98efd4732d30ec.tar.gz
aur-5d6f465170392861c0438723fa98efd4732d30ec.tar.xz
Cache all front page stats in APC if available
Use the APC cache to store all of the counts and the recently updated package list in a cache, which cuts down on the number of database queries needed. If the data isn't perfectly up to date we will survive. This version of the patch will also cache the relevant counts for individual logged-in users and is more careful about checking whether the value actually exists in the cache by using the status reference to apc_fetch(). Signed-off-by: Dan McGee <dan@archlinux.org> Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Diffstat (limited to 'web/template/stats')
-rw-r--r--web/template/stats/updates_table.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/web/template/stats/updates_table.php b/web/template/stats/updates_table.php
index e1eb888e..9d1af01c 100644
--- a/web/template/stats/updates_table.php
+++ b/web/template/stats/updates_table.php
@@ -6,8 +6,7 @@
</th>
</tr>
-<?php while ($row = mysql_fetch_assoc($newest_packages)): ?>
-
+<?php foreach ($newest_packages->getIterator() as $row): ?>
<tr>
<td class="boxSoft">
<span class="f4"><span class="blue">
@@ -34,7 +33,7 @@ endif;
</td>
</tr>
-<?php endwhile; ?>
+<?php endforeach; ?>
</table>