summaryrefslogtreecommitdiff
path: root/viewfeed.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-02-02 16:58:02 +0300
committerAndrew Dolgov <[email protected]>2009-02-02 16:58:02 +0300
commite0999d95c3204bc6477baf55a7d29cb783c9677c (patch)
treee4616bab7a12f9679aede20169e59d65bbb8c30d /viewfeed.js
parent3e2937fc2182e9cba7df4eb6d7427ce2064fb083 (diff)
cache_expire: separate TTL for various kinds of cached objects
Diffstat (limited to 'viewfeed.js')
-rw-r--r--viewfeed.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/viewfeed.js b/viewfeed.js
index fd811d7f5..e83303500 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) {