1
0
Fork 0
forked from blallo/rss-bridge

[Bridge] Simplify cache loading

This commit is contained in:
logmanoriginal 2016-09-01 19:43:25 +02:00
parent 85a025a82b
commit cd9435b936

View file

@ -251,14 +251,11 @@ abstract class BridgeAbstract implements BridgeInterface {
if(!is_null($this->cache)){ if(!is_null($this->cache)){
$this->cache->prepare($inputs); $this->cache->prepare($inputs);
$time = $this->cache->getTime(); $time = $this->cache->getTime();
} else {
$time = false;
}
if($time !== false && (time() - $this->getCacheDuration() < $time)){ if($time !== false && (time() - $this->getCacheDuration() < $time)){
$this->items = $this->cache->loadData(); $this->items = $this->cache->loadData();
return; return;
} }
}
if(empty($this->parameters)){ if(empty($this->parameters)){
if(!empty($inputs)){ if(!empty($inputs)){