public function setPrivate() { $this->headers->removeCacheControlDirective('public'); $this->headers->addCacheControlDirective('private'); return $this; }
public function indexAction(Request $request) { $response = new Response(); $response->setPrivate(); $response->setContent($this->twig->render('www/Index.twig', array())); return $response; }