aboutsummaryrefslogtreecommitdiff
path: root/caches/FileCache.php
diff options
context:
space:
mode:
authorGravatar Dag <me@dvikan.no> 2024-08-30 02:29:51 +0200
committerGravatar GitHub <noreply@github.com> 2024-08-30 02:29:51 +0200
commit3e1a8b29d95fe7fc0120e813ab623720ae056b8b (patch)
tree5b2ffa3210374942c756489d04799764e9c92278 /caches/FileCache.php
parent9f48370eb0fd5aba832b9db9eb9b1bc8915f5417 (diff)
downloadrss-bridge-3e1a8b29d95fe7fc0120e813ab623720ae056b8b.tar.gz
rss-bridge-3e1a8b29d95fe7fc0120e813ab623720ae056b8b.tar.zst
rss-bridge-3e1a8b29d95fe7fc0120e813ab623720ae056b8b.zip
fix: extract duplicate config loading (#4242)
Also fix a problem with bin/cache-prune and FileCache and its enable_purge option
Diffstat (limited to 'caches/FileCache.php')
-rw-r--r--caches/FileCache.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/caches/FileCache.php b/caches/FileCache.php
index 7a0eb81d..dfd295e8 100644
--- a/caches/FileCache.php
+++ b/caches/FileCache.php
@@ -97,8 +97,10 @@ class FileCache implements CacheInterface
}
$expiration = $item['expiration'] ?? time();
if ($expiration === 0 || $expiration > time()) {
+ // Cached forever, or not expired yet
continue;
}
+ // Expired, so delete file
unlink($cacheFile);
}
}