Created
August 29, 2012 07:34
-
-
Save Gregoire-M/3508003 to your computer and use it in GitHub Desktop.
ESI issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function displayAction(Post $post) | |
{ | |
// page caching | |
$response = new Response(); | |
$response->setLastModified($post->getModificationDate()); | |
$response->setPublic(); | |
if ($response->isNotModified($this->getRequest())) { | |
return $response; | |
} | |
// ... | |
return $this->render('GregoireMBlogBundle:Blog:display.html.twig', array( | |
'post' => $post, | |
'uid' => rand(0, 10000), | |
), $response); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment