我知道有人使用return(pass)的原因是因为不想缓存内容并将请求传递给后端。
所以,如果真的是这样,为什么我要用HIT代替MISS。
这是我的vcl:
sub vcl_recv{
if (req.method == "GET" && req.method == "HEAD"){
return (pass);
}
}
这是varnishlog的一部分:
谢谢你。
最佳答案
我发现了错误。我在说:
if (req.method == "GET" && req.method == "HEAD") {
return (pass);
}
代替:
if (req.method == "GET" || req.method == "HEAD") {
return (pass);
}
谢谢你。
关于varnish - 返回(通过)HIT或MISS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44768337/