mirror of
https://github.com/RSS-Bridge/rss-bridge.git
synced 2025-08-08 17:46:34 +02:00
fix(CacheInterface): logic bug in getTime (#3491)
* fix(CacheInterface): logic bug in getTime * test
This commit is contained in:
@@ -423,7 +423,13 @@ abstract class BridgeAbstract implements BridgeInterface
|
||||
$scope = $this->getShortName();
|
||||
$cache->setScope($scope);
|
||||
$cache->setKey($key);
|
||||
if ($duration && $cache->getTime() < time() - $duration) {
|
||||
$timestamp = $cache->getTime();
|
||||
|
||||
if (
|
||||
$duration
|
||||
&& $timestamp
|
||||
&& $timestamp < time() - $duration
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
return $cache->loadData();
|
||||
|
Reference in New Issue
Block a user