From aa1750b3735f079afa9bc0811df631b39e3fab5b Mon Sep 17 00:00:00 2001 From: Szyszewski Date: Fri, 4 Sep 2015 01:19:44 +0200 Subject: [PATCH] Update http_cache.rst Forgotten new Response instance in example from Validation with the Last-Modified Header section. --- book/http_cache.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/book/http_cache.rst b/book/http_cache.rst index 7206a1952b3..66c68721aac 100644 --- a/book/http_cache.rst +++ b/book/http_cache.rst @@ -651,6 +651,7 @@ header value:: namespace AppBundle\Controller; // ... + use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Request; use AppBundle\Entity\Article; @@ -665,6 +666,7 @@ header value:: $date = $authorDate > $articleDate ? $authorDate : $articleDate; + $response = new Response(); $response->setLastModified($date); // Set response as public. Otherwise it will be private by default. $response->setPublic();