![varnish屏蔽control+F5导致缓存失效 varnish屏蔽control+F5导致缓存失效](https://image.shishitao.com:8440/aHR0cHM6Ly9ia3FzaW1nLmlrYWZhbi5jb20vdXBsb2FkL2NoYXRncHQtcy5wbmc%2FIQ%3D%3D.png?!?w=700&webp=1)
刚刚接触Varnish缓存,对静态资源进行缓存。目前问题,当浏览器Control+F5刷新页面,导致缓存失效、
参照:http://zhangxugg-163-com.iteye.com/blog/1075206 修改下Varnish配置
sub vcl_hit { #if (req.http.Cache-Control ~ "no-cache") { # if (! (req.http.Via || req.http.User-Agent ~ "bot|MSIE")) { # set obj.ttl = 0s; # return (restart); # } #} return(deliver); }