【发布时间】:2018-11-24 10:45:09
【问题描述】:
我在注释中尝试
* @Cache(expires="+10 hours", public=false)
或在控制器中
$maxAge = 60*60;
$response->setExpires(Carbon::create()->addHour());
$response->setSharedMaxAge($maxAge);
$response->setPublic();
$response->setMaxAge($maxAge);
还有Cache-Control: max-age=0, must-revalidate, private
应用程序使用会话,用户正在登录 - 我想要 - 缓存私有,但没有任何工作 - 我总是得到这个。
我已添加FOS\HttpCacheBundle\FOSHttpCacheBundle()
(只是添加)希望它覆盖 symfony 缓存并允许发送缓存私有 - 但没有任何改变。
【问题讨论】:
标签: symfony caching foshttpcachebundle