@@ -588,7 +588,7 @@ To see a simple implementation, generate the ETag as the md5 of the content::
588
588
{
589
589
public function homepageAction(Request $request)
590
590
{
591
- $response = $this->render('homepage.html.twig');
591
+ $response = $this->render('static/ homepage.html.twig');
592
592
$response->setETag(md5($response->getContent()));
593
593
$response->setPublic(); // make sure the response is public/cacheable
594
594
$response->isNotModified($request);
@@ -1019,7 +1019,6 @@ First, to use ESI, be sure to enable it in your application configuration:
1019
1019
http://symfony.com/schema/dic/services/services-1.0.xsd
1020
1020
http://symfony.com/schema/dic/symfony
1021
1021
http://symfony.com/schema/dic/symfony/symfony-1.0.xsd" >
1022
- ">
1023
1022
1024
1023
<framework : config >
1025
1024
<!-- ... -->
@@ -1048,7 +1047,7 @@ independent of the rest of the page.
1048
1047
{
1049
1048
public function aboutAction()
1050
1049
{
1051
- $response = $this->render('about.html.twig');
1050
+ $response = $this->render('static/ about.html.twig');
1052
1051
// set the shared max age - which also marks the response as public
1053
1052
$response->setSharedMaxAge(600);
1054
1053
@@ -1068,7 +1067,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
1068
1067
1069
1068
.. code-block :: jinja
1070
1069
1071
- {# app/Resources/views/about.html.twig #}
1070
+ {# app/Resources/views/static/ about.html.twig #}
1072
1071
1073
1072
{# you can use a controller reference #}
1074
1073
{{ render_esi(controller('AppBundle:News:latest', { 'maxPerPage': 5 })) }}
@@ -1078,7 +1077,7 @@ matter), Symfony uses the standard ``render`` helper to configure ESI tags:
1078
1077
1079
1078
.. code-block :: html+php
1080
1079
1081
- <!-- app/Resources/views/about.html.php -->
1080
+ <!-- app/Resources/views/static/ about.html.php -->
1082
1081
1083
1082
// you can use a controller reference
1084
1083
use Symfony\C omponent\H ttpKernel\C ontroller\C ontrollerReference;
0 commit comments