小编alt*_*ric的帖子

清漆4,清洗 - 我以为我已经弄明白了

好吧,我会保持简单,PURGE请求(或者我认为?)几乎全部由字面处理:

acl purge {

    "localhost";

    "127.0.0.1";

}
Run Code Online (Sandbox Code Playgroud)

然后

if (req.method == "PURGE") {
            if (!client.ip ~ purge) {
            return(synth(405, "This IP is not allowed to send PURGE requests."));
            }
            return (purge);
    }
Run Code Online (Sandbox Code Playgroud)

我相当肯定上述两个陈述都是"正确的",我挂断的是如果我发送了一个

curl -X PURGE http://domain.com/
Run Code Online (Sandbox Code Playgroud)

要么

curl -X PURGE http://domain.com/.*

和Varnish发回200 Purged well ...缓存被清除了?即使它只是主页而不是整个缓存(发誓它都是使用上面的.*方法)并且上面的代码片段是正确的有任何特殊原因http://domain.com(如在实际的主页中) )没有被清除?

varnishncsa显示:

MYIP - - [16/Feb/2015:23:23:10 -0600] "PURGE http://domain.com/ HTTP/1.1" 200 241 "-" "curl/7.29.0"
Run Code Online (Sandbox Code Playgroud)

我知道我得失去一些愚蠢的东西,但我无法弄明白吗?

caching varnish varnish-vcl

6
推荐指数
1
解决办法
5170
查看次数

标签 统计

caching ×1

varnish ×1

varnish-vcl ×1