Symfony 3.4 http cache , always Cache-Control: max-age=0, must-revalidate, private
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I try in annotation * @Cache(expires="+10 hours", public=false) or in controller $maxAge = 60*60; $response->setExpires(Carbon::create()->addHour()); $response->setSharedMaxAge($maxAge); $response->setPublic(); $response->setMaxAge($maxAge); And still have Cache-Control: max-age=0, must-revalidate, private App use sessions, user is login - I want - cache private, but nothing work - I always get this. I've added FOS\HttpCacheBundle\FOSHttpCacheBundle() (just add) Have hope to it override symfony cache and allow send cache private - but