Skip to content

Commit 2d6bcde

Browse files
author
Hugo Hamon
committed
[book] [http_cache] fixed wrong usage of ->renderView() method in a Controller. Changed to ->render() call.
1 parent 8932f4f commit 2d6bcde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

book/http_cache.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ md5 of the content::
545545

546546
public function indexAction()
547547
{
548-
$response = $this->renderView('MyBundle:Main:index.html.twig');
548+
$response = $this->render('MyBundle:Main:index.html.twig');
549549
$response->setETag(md5($response->getContent()));
550550
$response->isNotModified($this->getRequest());
551551

@@ -835,7 +835,7 @@ independent of the rest of the page.
835835
836836
public function indexAction()
837837
{
838-
$response = $this->renderView('MyBundle:MyController:index.html.twig');
838+
$response = $this->render('MyBundle:MyController:index.html.twig');
839839
$response->setSharedMaxAge(600);
840840
841841
return $response;

0 commit comments

Comments
 (0)