function HttpCache::terminate
Overrides TerminableInterface::terminate
File
-
vendor/
symfony/ http-kernel/ HttpCache/ HttpCache.php, line 239
Class
- HttpCache
- Cache provides HTTP caching.
Namespace
Symfony\Component\HttpKernel\HttpCacheCode
public function terminate(Request $request, Response $response) : void {
// Do not call any listeners in case of a cache hit.
// This ensures identical behavior as if you had a separate
// reverse caching proxy such as Varnish and the like.
if (\in_array('fresh', $this->traces[$this->getTraceKey($request)] ?? [], true)) {
return;
}
if ($this->getKernel() instanceof TerminableInterface) {
$this->getKernel()
->terminate($request, $response);
}
}