vcl_recv的默认配置
vcl_recv的默认配置:
sub vcl_recv {
if (req.method == “PRI”) {
/ We do not support SPDY or HTTP/2.0 /
return (synth(405));
}
if (req.method != “GET” &&
req.method != “HEAD” &&
req.method != “PUT” &&
req.method != “POST” &&
req.method != “TRACE” &&
req.method != “OPTIONS” &&
req.method != “DELETE”) {
/ Non-RFC2616 or CONNECT which is weird. /
return (pipe);
}
if (req.method != “GET” && req.method != “HEAD”) {
/ We only deal with GET and HEAD by default /
return (pass);
}
if (req.http.Authorization || req.http.Cookie) {
/ Not cacheable by default /
return (pass);
}
return (hash);
}
}
Client Side:
vcl_recv, vcl_pass, vcl_hit, vcl_miss, vcl_pipe, vcl_purge, vcl_synth, vcl_deliver
vcl_recv:
hash:vcl_hash
pass: vcl_pass
pipe: vcl_pipe
synth: vcl_synth
purge: vcl_hash –> vcl_purge
vcl_hash:
lookup:
hit: vcl_hit
miss: vcl_miss
pass, hit_for_pass: vcl_pass
purge: vcl_purge
Backend Side:
vcl_backend_fetch, vcl_backend_response, vcl_backend_error
学员评价