Skip to content

Commit 67991a8

Browse files
committed
Fixed code examples in book/http_cache
1 parent 4c61469 commit 67991a8

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

book/http_cache.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ To enable caching, modify the code of a front controller to use the caching
144144
kernel::
145145

146146
// web/app.php
147-
148147
require_once __DIR__.'/../app/bootstrap.php.cache';
149148
require_once __DIR__.'/../app/AppKernel.php';
150149
require_once __DIR__.'/../app/AppCache.php';
@@ -173,7 +172,6 @@ finely tuned via a set of options you can set by overriding the ``getOptions()``
173172
method::
174173

175174
// app/AppCache.php
176-
177175
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
178176

179177
class AppCache extends HttpCache
@@ -643,7 +641,7 @@ exposing a simple and efficient pattern::
643641
// the ETag or the Last-Modified value
644642
// (based on the Request, data is retrieved from
645643
// a database or a key-value store for instance)
646-
$article = // ...
644+
$article = ...;
647645

648646
// create a Response with a ETag and/or a Last-Modified header
649647
$response = new Response();
@@ -656,7 +654,7 @@ exposing a simple and efficient pattern::
656654
return $response;
657655
} else {
658656
// do more work here - like retrieving more data
659-
$comments = // ...
657+
$comments = ...;
660658

661659
// or render a template with the $response you've already started
662660
return $this->render(
@@ -776,14 +774,15 @@ as this is the only useful one outside of Akamaï context:
776774

777775
.. code-block:: html
778776

777+
<!doctype html>
779778
<html>
780779
<body>
781-
Some content
780+
... some content
782781

783782
<!-- Embed the content of another page here -->
784783
<esi:include src="http://..." />
785784

786-
More content
785+
... more content
787786
</body>
788787
</html>
789788

@@ -1052,4 +1051,4 @@ Learn more from the Cookbook
10521051
.. _`HTTP Bis`: http://tools.ietf.org/wg/httpbis/
10531052
.. _`P4 - Conditional Requests`: http://tools.ietf.org/html/draft-ietf-httpbis-p4-conditional-12
10541053
.. _`P6 - Caching: Browser and intermediary caches`: http://tools.ietf.org/html/draft-ietf-httpbis-p6-cache-12
1055-
.. _`ESI`: http://www.w3.org/TR/esi-lang
1054+
.. _`ESI`: http://www.w3.org/TR/esi-lang

0 commit comments

Comments
 (0)