我使用清漆与码头工人 - 见百万12 /清漆
GET请求工作得很好!
但我不知道我必须在设置中设置缓存POST请求.
在谷歌我发现很多帖子(从2010年或2011年),它说POST请求不能用清漆缓存 - 这句话是否仍然正确?
或者是否有另一种缓存POST请求的方法?
这里我的varnish.vcl设置:
vcl 4.0;
backend default {
...
}
# Respond to incoming requests.
sub vcl_recv {
unset req.http.Cookie;
}
# Set a header to track a cache HIT/MISS.
sub vcl_deliver {
if (obj.hits > 0) {
set resp.http.X-Varnish-Cache = "HIT";
}
else {
set resp.http.X-Varnish-Cache = "MISS";
}
}
# Not cache 400 - 500 status requests
sub vcl_backend_response {
if (beresp.status >= 400 && beresp.status <= …Run Code Online (Sandbox Code Playgroud)