mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:35:55 +00:00
rate limit counters calculation in view to once per 10 sec
This commit is contained in:
@@ -238,12 +238,14 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (get_pref($link, "SYNC_COUNTERS") || ($mode == "prefetch" && $csync)) {
|
// if (get_pref($link, "SYNC_COUNTERS") || ($mode == "prefetch" && $csync)) {
|
||||||
|
|
||||||
|
if (time() - $_SESSION["view:counters_stamp"] > 10) {
|
||||||
print "<counters>";
|
print "<counters>";
|
||||||
getAllCounters($link, $omode);
|
getAllCounters($link, $omode);
|
||||||
print "</counters>";
|
print "</counters>";
|
||||||
// }
|
$_SESSION["view:counters_stamp"] = time();
|
||||||
|
}
|
||||||
|
|
||||||
print "</reply>";
|
print "</reply>";
|
||||||
break; // view
|
break; // view
|
||||||
|
|||||||
Reference in New Issue
Block a user