Be a bit more verbose on varnish cache clear

Signed-off-by: Patrick Uiterwijk <puiterwijk@redhat.com>
This commit is contained in:
Patrick Uiterwijk 2016-03-05 15:06:11 +00:00
parent 0a77348f77
commit f8767fae87

View file

@ -349,3 +349,24 @@ sub vcl_backend_response {
set beresp.ttl = 6h;
}
}
sub vcl_pipe {
set req.http.connection = "close";
}
sub vcl_hit {
if (req.method == "PURGE") {
ban(req.url);
return (synth(200, "Purged"));
}
if (!obj.ttl > 0s) {
return (pass);
}
}
sub vcl_miss {
if (req.method == "PURGE") {
return (synth(200, "Not in cache"));
}
}