Removed ESI instance check

This commit is contained in:
Oleg Voronkovich 2015-12-11 19:11:08 +03:00
parent bb1c6f60e9
commit 7528134b8e

View File

@ -153,16 +153,10 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
/** /**
* Gets the Surrogate instance. * Gets the Surrogate instance.
* *
* @throws \LogicException
*
* @return SurrogateInterface A Surrogate instance * @return SurrogateInterface A Surrogate instance
*/ */
public function getSurrogate() public function getSurrogate()
{ {
if (!$this->surrogate instanceof Esi) {
throw new \LogicException('This instance of HttpCache was not set up to use ESI as surrogate handler. You must overwrite and use createSurrogate');
}
return $this->surrogate; return $this->surrogate;
} }