[master] da4d717 Make obj.uncacheable available in vcl_deliver
Federico G. Schwindt
fgsch at lodoss.net
Mon Nov 10 14:28:28 CET 2014
commit da4d717261d93a2e39ff2371302271b6defca608
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Mon Nov 10 11:43:32 2014 +0000
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.
diff --git a/bin/varnishtest/tests/v00025.vtc b/bin/varnishtest/tests/v00025.vtc
index da4476f..ffd622b 100644
--- a/bin/varnishtest/tests/v00025.vtc
+++ b/bin/varnishtest/tests/v00025.vtc
@@ -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);
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index 74e4c86..75b1f9b 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -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',
More information about the varnish-commit
mailing list