mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-26 02:31:29 +00:00
cache_invalidate: fix
This commit is contained in:
21
viewfeed.js
21
viewfeed.js
@@ -879,13 +879,20 @@ function cache_expire() {
|
||||
|
||||
function cache_invalidate(id) {
|
||||
var i = 0
|
||||
|
||||
while (i < article_cache.length) {
|
||||
if (article_cache[i]["id"] == id) {
|
||||
article_cache.remove(i);
|
||||
return true;
|
||||
|
||||
try {
|
||||
|
||||
while (i < article_cache.length) {
|
||||
if (article_cache[i]["id"] == id) {
|
||||
debug("cache_invalidate: removed id " + id);
|
||||
article_cache.splice(i, 1);
|
||||
return true;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
i++;
|
||||
debug("cache_invalidate: id not found: " + id);
|
||||
return false;
|
||||
} catch (e) {
|
||||
exception_error("cache_invalidate", e);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user