viewfeed: rate limit ccache_update

This commit is contained in:
Andrew Dolgov 2009-01-17 18:27:37 +01:00
parent 51e196dee9
commit 34c30ac126
1 changed files with 5 additions and 2 deletions

View File

@ -273,8 +273,11 @@
/* Updating a label ccache means recalculating all of the caches
* so for performance reasons we don't do that here */
if ($feed >= 0) {
ccache_update($link, $feed, $_SESSION["uid"], $cat_view);
if (time() - $_SESSION["viewfeed:ccache_update_stamp"] > 120) {
if ($feed >= 0) {
ccache_update($link, $feed, $_SESSION["uid"], $cat_view);
}
$_SESSION["viewfeed:ccache_update_stamp"] = time();
}
set_pref($link, "_DEFAULT_VIEW_MODE", $view_mode);