1
0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-08-05 16:17:28 +02:00

fix(cache): bug in cache logic (#3553)

It is possible to have a cached item with a very old mtime but it's technically expired.

So, check for presence of time and whether the time it is within 10 days
This commit is contained in:
Dag
2023-07-19 22:05:26 +02:00
committed by GitHub
parent a4a328583a
commit 93620aa105

View File

@@ -140,7 +140,7 @@ function getContents(
$cache->setScope('server');
$cache->setKey([$url]);
if (!Debug::isEnabled() && $cache->getTime()) {
if (!Debug::isEnabled() && $cache->getTime() && $cache->loadData(86400 * 7)) {
$config['if_not_modified_since'] = $cache->getTime();
}