Merge remote branch 'mbontemps/httpCache-fix'
* mbontemps/httpCache-fix: Add a public getter for the Esi instance Fix kernel access in HttpCache due to kernel attribute privatization
This commit is contained in:
commit
3d44c44f9a
@ -49,9 +49,9 @@ abstract class HttpCache extends BaseHttpCache
|
|||||||
*/
|
*/
|
||||||
protected function forward(Request $request, $raw = false, Response $entry = null)
|
protected function forward(Request $request, $raw = false, Response $entry = null)
|
||||||
{
|
{
|
||||||
$this->kernel->boot();
|
$this->getKernel()->boot();
|
||||||
$this->kernel->getContainer()->set('cache', $this);
|
$this->getKernel()->getContainer()->set('cache', $this);
|
||||||
$this->kernel->getContainer()->set('esi', $this->esi);
|
$this->getKernel()->getContainer()->set('esi', $this->getEsi());
|
||||||
|
|
||||||
return parent::forward($request, $raw, $entry);
|
return parent::forward($request, $raw, $entry);
|
||||||
}
|
}
|
||||||
|
@ -128,6 +128,27 @@ class HttpCache implements HttpKernelInterface
|
|||||||
return $this->request;
|
return $this->request;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Kernel instance
|
||||||
|
*
|
||||||
|
* @return Symfony\Component\HttpKernel\HttpKernelInterface An HttpKernelInterface instance
|
||||||
|
*/
|
||||||
|
public function getKernel()
|
||||||
|
{
|
||||||
|
return $this->kernel;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the Esi instance
|
||||||
|
*
|
||||||
|
* @return Symfony\Component\HttpKernel\HttpCache\Esi An Esi instance
|
||||||
|
*/
|
||||||
|
public function getEsi()
|
||||||
|
{
|
||||||
|
return $this->esi;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@inheritdoc}
|
* {@inheritdoc}
|
||||||
*/
|
*/
|
||||||
|
Reference in New Issue
Block a user