编辑config文件
# 禁用缓存
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires 0;
如果是针对某个域名zlXXX.cc;的禁用缓存:
server {
listen 80;
server_name zlXXX.cc;
#禁止DNS缓存
resolver_timeout 0;
# 禁用游览器缓存
add_header Cache-Control "no-cache, no-store, must-revalidate";
add_header Pragma "no-cache";
add_header Expires 0;
# 其他配置
...
}