]> git.wh0rd.org Git - tt-rss.git/commitdiff
rate limit counters calculation in view to once per 10 sec
authorAndrew Dolgov <fox@bah.spb.su>
Thu, 22 Jan 2009 15:14:00 +0000 (16:14 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Thu, 22 Jan 2009 15:14:00 +0000 (16:14 +0100)
backend.php

index f47ba00aff7a5645cd53222c2ea8cfc277b63db5..6bdeaa7192284021fd15cf19ce1bae8704831816 100644 (file)
                                }
                        }
 
-
 //                     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