Is it fine if first response is private with AppCache (Symfony2)?

前端 未结 2 873
小鲜肉
小鲜肉 2021-01-30 19:18

I\'m trying to use http caching. In my controller I\'m setting a response as follows:

$response->setPublic();
$response->setMaxAge(120);
$response->set         


        
2条回答
  •  青春惊慌失措
    2021-01-30 19:33

    The behavior you experience is intended. Symfony2 Docs explicitly describe the situations when private and public are used, default being private.

提交回复
热议问题