http cache的状态是不允许缓存no-store 迅睿框架 更新 2021-04-17 13:04:01 迅睿粉丝 默认程序的http cache的状态是不允许缓存no-store,如上截图,如何修改成public 支持代理服务器以及客户端都可以对内容进行缓存 ,如下图
比如Nginx
以下代码片段可以添加到 Nginx 配置文件中。这个例子里面使用了 Cache-Control 响应头的
public指令和no-transform指令,同时设置了过期时间(expire)为两天。location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { expires 2d; add_header Cache-Control "public, no-transform"; }吕小刀location ~* \.(js|css|png|jpg|jpeg|gif|ico|php|html)$ { expires 2d; add_header Cache-Control "public, no-transform"; }你加上php和html试一下呢吕小刀