From cd9435b9362f7085ec51adbb791f8562a1dca48f Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Thu, 1 Sep 2016 19:43:25 +0200 Subject: [PATCH] [Bridge] Simplify cache loading --- lib/Bridge.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index 583598d8..bbc87be6 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -251,13 +251,10 @@ abstract class BridgeAbstract implements BridgeInterface { if(!is_null($this->cache)){ $this->cache->prepare($inputs); $time = $this->cache->getTime(); - } else { - $time = false; - } - - if($time !== false && (time() - $this->getCacheDuration() < $time)){ - $this->items = $this->cache->loadData(); - return; + if($time !== false && (time() - $this->getCacheDuration() < $time)){ + $this->items = $this->cache->loadData(); + return; + } } if(empty($this->parameters)){