summaryrefslogtreecommitdiff
path: root/plugins/Sitemap
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-07-14 10:38:34 -0400
committerEvan Prodromou <evan@status.net>2010-07-14 10:38:34 -0400
commitd73feb82d89d66593fd81f8bb5d10b1873fc9458 (patch)
tree416afd4a954b36b3fbe09459c79bae7599c1395a /plugins/Sitemap
parent453a06fff4f92a9fd34db2899c012d828c69202e (diff)
cache sitemap notice and user counts for 4h
Diffstat (limited to 'plugins/Sitemap')
-rw-r--r--plugins/Sitemap/Sitemap_notice_count.php4
-rw-r--r--plugins/Sitemap/Sitemap_user_count.php4
2 files changed, 6 insertions, 2 deletions
diff --git a/plugins/Sitemap/Sitemap_notice_count.php b/plugins/Sitemap/Sitemap_notice_count.php
index 2a375b3e4..6e0061e97 100644
--- a/plugins/Sitemap/Sitemap_notice_count.php
+++ b/plugins/Sitemap/Sitemap_notice_count.php
@@ -153,7 +153,9 @@ class Sitemap_notice_count extends Memcached_DataObject
$noticeCounts[$snc->notice_date] = $snc->notice_count;
}
- self::cacheSet('sitemap:notice:counts', $noticeCounts);
+ // Cache notice counts for 4 hours.
+
+ self::cacheSet('sitemap:notice:counts', $noticeCounts, null, time() + 4 * 60 * 60);
}
return $noticeCounts;
diff --git a/plugins/Sitemap/Sitemap_user_count.php b/plugins/Sitemap/Sitemap_user_count.php
index 64b4c3442..98dd05bfe 100644
--- a/plugins/Sitemap/Sitemap_user_count.php
+++ b/plugins/Sitemap/Sitemap_user_count.php
@@ -154,7 +154,9 @@ class Sitemap_user_count extends Memcached_DataObject
$userCounts[$suc->registration_date] = $suc->user_count;
}
- self::cacheSet('sitemap:user:counts', $userCounts);
+ // Cache user counts for 4 hours.
+
+ self::cacheSet('sitemap:user:counts', $userCounts, null, time() + 4 * 60 * 60);
}
return $userCounts;