viewfeed: rate limit ccache_update

master
Andrew Dolgov 16 years ago
parent 51e196dee9
commit 34c30ac126

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

Loading…
Cancel
Save