]> git.wh0rd.org Git - tt-rss.git/commitdiff
cache_expire: separate TTL for various kinds of cached objects
authorAndrew Dolgov <fox@bah.org.ru>
Mon, 2 Feb 2009 13:58:02 +0000 (16:58 +0300)
committerAndrew Dolgov <fox@bah.org.ru>
Mon, 2 Feb 2009 13:58:02 +0000 (16:58 +0300)
viewfeed.js

index fd811d7f595b22260faa0f7241d4adbfbc1ef998..e8330350043e2c43a385ef63646e8359924dc265 100644 (file)
@@ -1583,7 +1583,10 @@ function cache_expire() {
                var date = new Date();
                var ts = Math.round(date.getTime() / 1000);
 
-               db.execute("DELETE FROM cache WHERE added < ? - 600", [ts]);
+               db.execute("DELETE FROM cache WHERE added < ? - 1800 AND id LIKE 'FEEDLIST'", [ts]);
+               db.execute("DELETE FROM cache WHERE added < ? - 600 AND (id LIKE 'F:%' OR id LIKE 'C:%')", [ts]);
+               db.execute("DELETE FROM cache WHERE added < ? - 86400", [ts]);
+
 
        } else {
                while (article_cache.length > 25) {