糖尿病康复,内容丰富有趣,生活中的好帮手!
糖尿病康复 > 缓存 Cache-Control:max-age symfony

缓存 Cache-Control:max-age symfony

时间:2022-12-13 16:46:35

相关推荐

缓存 Cache-Control:max-age symfony

1、代码设置:(注释方式)useSensio\Bundle\FrameworkExtraBundle\Configuration\Cache;

/**@Cache(smaxage="3600",maxage="3600",public=true)*/(手动方式)$cacheTime=3600;$response=newJsonResponse($channelDatas,200);$response->setPublic()->setMaxAge($cacheTime)->setSharedMaxAge($cacheTime);2、nginx配置location~\.php($|/){includefastcgi_params;fastcgi_pass127.0.0.1:9000;fastcgi_cachefastcgicache;//必须加上}

如果觉得《缓存 Cache-Control:max-age symfony》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。