mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-18 18:01:30 +00:00
cache_expire: separate TTL for various kinds of cached objects
This commit is contained in:
@@ -1583,7 +1583,10 @@ function cache_expire() {
|
|||||||
var date = new Date();
|
var date = new Date();
|
||||||
var ts = Math.round(date.getTime() / 1000);
|
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 {
|
} else {
|
||||||
while (article_cache.length > 25) {
|
while (article_cache.length > 25) {
|
||||||
|
|||||||
Reference in New Issue
Block a user