From: Andrew Dolgov Date: Mon, 2 Feb 2009 13:58:02 +0000 (+0300) Subject: cache_expire: separate TTL for various kinds of cached objects X-Git-Tag: 1.3.1~134 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=e0999d95c3204bc6477baf55a7d29cb783c9677c;p=tt-rss.git cache_expire: separate TTL for various kinds of cached objects --- diff --git a/viewfeed.js b/viewfeed.js index fd811d7f..e8330350 100644 --- a/viewfeed.js +++ b/viewfeed.js @@ -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) {