[BridgeAbstract] Don't load cache file in DEBUG mode

This commit is contained in:
logmanoriginal 2016-10-02 17:00:53 +02:00
parent 978e5cdbf5
commit b0784e5a42

View file

@ -140,7 +140,9 @@ abstract class BridgeAbstract implements BridgeInterface {
if(!is_null($this->cache)){
$this->cache->prepare($inputs);
$time = $this->cache->getTime();
if($time !== false && (time() - static::CACHE_TIMEOUT < $time)){
if($time !== false
&& (time() - static::CACHE_TIMEOUT < $time)
&& (!defined('DEBUG') || DEBUG !== true)){
$this->items = $this->cache->loadData();
return;
}