mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-04-09 16:38:50 +00: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:
parent
a4a328583a
commit
93620aa105
@ -140,7 +140,7 @@ function getContents(
|
|||||||
$cache->setScope('server');
|
$cache->setScope('server');
|
||||||
$cache->setKey([$url]);
|
$cache->setKey([$url]);
|
||||||
|
|
||||||
if (!Debug::isEnabled() && $cache->getTime()) {
|
if (!Debug::isEnabled() && $cache->getTime() && $cache->loadData(86400 * 7)) {
|
||||||
$config['if_not_modified_since'] = $cache->getTime();
|
$config['if_not_modified_since'] = $cache->getTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user