cache_expire: separate TTL for various kinds of cached objects

master
Andrew Dolgov 16 years ago
parent 3e2937fc21
commit e0999d95c3

@ -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) {

Loading…
Cancel
Save