Commit da4d7172 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Make obj.uncacheable available in vcl_deliver

With this is possible to find out whether the request was a pass (or
hit-for-pass) in a single place.
parent ceb74b60
......@@ -22,6 +22,7 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
set resp.http.esi = req.esi;
set resp.http.be = req.backend_hint;
set resp.http.c_id = client.identity;
if (obj.uncacheable) { }
}
sub vcl_backend_response {
......@@ -41,7 +42,6 @@ varnish v1 -arg "-i J.F.Nobody" -vcl+backend {
sub vcl_hit {
if (obj.proto) { }
if (obj.reason) { }
if (obj.uncacheable) { }
if (obj.keep > 1m) { }
if (obj.grace < 3m) {
return (deliver);
......
......@@ -605,9 +605,9 @@ sp_variables = [
),
('obj.uncacheable',
'BOOL',
( 'hit', ),
( 'deliver', ),
( ), """
Whether the object is uncacheable (aka hit-for-pass)
Whether the object is uncacheable (pass or hit-for-pass).
"""
),
('resp',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment