Avoid stale-if-error if kernel.debug = true, because it hides errors
This commit is contained in:
parent
d1e31a4fe0
commit
3a23ec89c3
@ -37,7 +37,14 @@ abstract class HttpCache extends BaseHttpCache
|
|||||||
$this->kernel = $kernel;
|
$this->kernel = $kernel;
|
||||||
$this->cacheDir = $cacheDir;
|
$this->cacheDir = $cacheDir;
|
||||||
|
|
||||||
parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge(['debug' => $kernel->isDebug()], $this->getOptions()));
|
$isDebug = $kernel->isDebug();
|
||||||
|
$options = ['debug' => $isDebug];
|
||||||
|
|
||||||
|
if ($isDebug) {
|
||||||
|
$options['stale_if_error'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge($options, $this->getOptions()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user