From: Andrew Dolgov Date: Thu, 22 Jan 2009 15:14:00 +0000 (+0100) Subject: rate limit counters calculation in view to once per 10 sec X-Git-Tag: git2svn-syncpoint-master~55 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=3c204a8e2374404d64493e91880af6d876935c2f;p=tt-rss.git rate limit counters calculation in view to once per 10 sec --- diff --git a/backend.php b/backend.php index f47ba00a..6bdeaa71 100644 --- a/backend.php +++ b/backend.php @@ -238,12 +238,14 @@ } } - // if (get_pref($link, "SYNC_COUNTERS") || ($mode == "prefetch" && $csync)) { + + if (time() - $_SESSION["view:counters_stamp"] > 10) { print ""; getAllCounters($link, $omode); print ""; -// } + $_SESSION["view:counters_stamp"] = time(); + } print ""; break; // view