forked from blallo/rss-bridge
Merge branch 'DebugDisableCaching' of https://github.com/logmanoriginal/rss-bridge
This commit is contained in:
commit
f0f0ffb96a
2 changed files with 7 additions and 6 deletions
|
@ -41,7 +41,7 @@ if(file_exists('DEBUG')){
|
||||||
if($debug_enabled){
|
if($debug_enabled){
|
||||||
ini_set('display_errors', '1');
|
ini_set('display_errors', '1');
|
||||||
error_reporting(E_ALL);
|
error_reporting(E_ALL);
|
||||||
define('DEBUG', 'true');
|
define('DEBUG', true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,11 +116,10 @@ try {
|
||||||
die;
|
die;
|
||||||
}
|
}
|
||||||
|
|
||||||
$cache = Cache::create('FileCache');
|
|
||||||
|
|
||||||
// Data retrieval
|
// Data retrieval
|
||||||
$bridge = Bridge::create($bridge);
|
$bridge = Bridge::create($bridge);
|
||||||
if(!defined("DEBUG"))
|
|
||||||
|
$cache = Cache::create('FileCache');
|
||||||
$bridge->setCache($cache);
|
$bridge->setCache($cache);
|
||||||
|
|
||||||
$noproxy = filter_input(INPUT_GET, '_noproxy', FILTER_VALIDATE_BOOLEAN);
|
$noproxy = filter_input(INPUT_GET, '_noproxy', FILTER_VALIDATE_BOOLEAN);
|
||||||
|
|
|
@ -140,7 +140,9 @@ 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();
|
||||||
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();
|
$this->items = $this->cache->loadData();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue