diff options
author | Andrew Dolgov <[email protected]> | 2009-01-22 16:14:00 +0100 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2009-01-22 16:14:00 +0100 |
commit | 3c204a8e2374404d64493e91880af6d876935c2f (patch) | |
tree | 9c46ac1aeb767e8a277dd6579908118ed2cd84be /backend.php | |
parent | 014accd1fd4d4ab4befa0b11b77daa99e1b4a34d (diff) |
rate limit counters calculation in view to once per 10 sec
Diffstat (limited to 'backend.php')
-rw-r--r-- | backend.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/backend.php b/backend.php index f47ba00af..6bdeaa719 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 "<counters>"; getAllCounters($link, $omode); print "</counters>"; -// } + $_SESSION["view:counters_stamp"] = time(); + } print "</reply>"; break; // view |