Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitaa1750b

Browse files
szyszka90wouterj
authored andcommitted
Update http_cache.rst
Forgotten new Response instance in example from Validation with the Last-Modified Header section.
1 parentd64e993 commitaa1750b

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

‎book/http_cache.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,7 @@ header value::
651651
namespace AppBundle\Controller;
652652

653653
// ...
654+
use Symfony\Component\HttpFoundation\Response;
654655
use Symfony\Component\HttpFoundation\Request;
655656
use AppBundle\Entity\Article;
656657

@@ -665,6 +666,7 @@ header value::
665666

666667
$date = $authorDate > $articleDate ? $authorDate : $articleDate;
667668

669+
$response = new Response();
668670
$response->setLastModified($date);
669671
// Set response as public. Otherwise it will be private by default.
670672
$response->setPublic();

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp