Nginx 配置之开启缓存过期时间
Nginx 缓存 About 379 wordsexpires
默认单位:秒。
h
:时m
:分s
:秒y
:年
location ~ .*\.(?:jpg|jpeg|gif|png|ico|cur|gz|svg|svgz|mp4|ogg|ogv|webm)$ {
expires 1m;
}
location ~ .*\.(?:js|css)$ {
expires 1;
}
location ~ .*\.(?:eot|ttf|woff|woff2)$ {
expires 1y;
}
location ~ .*\.(?:html|htm)$ {
add_header Cache-Control "private, no-store, no-cache, must-revalidate, proxy-revalidate";
}
Views: 3,849 · Posted: 2019-03-20
————        END        ————
Give me a Star, Thanks:)
https://github.com/fendoudebb/LiteNote扫描下方二维码关注公众号和小程序↓↓↓
Loading...