2

这就是我所拥有的:

public function indexAction()
{
    $response=new Response();
    $response= $this->render('RatingBundle:Default:index.html.twig');

    $response->setPublic(true);
    $response->setSharedMaxAge(15000);

    return $response;
}

它出什么问题了?

当我检查应用程序环境时,我看到了响应标头

age:247
cache-control:max-age=0, must-revalidate=0, public, s-maxage=15000

但是当我在另一个浏览器中检查它时..我再次看到年龄 0 所以它再次加载对吗?

我怎样才能将其公开给所有人?

4

0 回答 0