Commit 20bb2a0b authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Add beresp.uncacheable (will replace beresp.do_pass) and obj.uncacheable

variables.
parent 6c6a41a2
......@@ -202,6 +202,7 @@ VBERESP(beresp, unsigned, do_gzip, busyobj->do_gzip)
VBERESP(beresp, unsigned, do_gunzip, busyobj->do_gunzip)
VBERESP(beresp, unsigned, do_stream, busyobj->do_stream)
VBERESP(beresp, unsigned, do_pass, busyobj->do_pass)
VBERESP(beresp, unsigned, uncacheable, busyobj->do_pass)
/*--------------------------------------------------------------------*/
......@@ -553,6 +554,14 @@ VRT_r_obj_lastuse(const struct req *req)
return (VTIM_real() - req->obj->last_use);
}
unsigned
VRT_r_obj_uncacheable(const struct req *req)
{
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
CHECK_OBJ_NOTNULL(req->obj, OBJECT_MAGIC);
return (req->obj->objcore->flags & OC_F_PASS ? 1 : 0);
}
unsigned
VRT_r_req_backend_healthy(const struct req *req)
{
......
......@@ -11,7 +11,7 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_response {
set beresp.do_pass = true;
set beresp.uncacheable = true;
}
} -start
......
......@@ -15,7 +15,7 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_response {
set beresp.do_pass = true;
set beresp.uncacheable = true;
}
} -start
......
......@@ -17,7 +17,7 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_response {
set beresp.do_pass = true;
set beresp.uncacheable = true;
set beresp.do_esi = true;
}
} -start
......
......@@ -8,7 +8,7 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_response {
set beresp.do_esi = true;
set beresp.do_pass = true;
set beresp.uncacheable = true;
}
} -start
......
......@@ -40,7 +40,7 @@ server s1 -start
varnish v1 -vcl+backend {
sub vcl_response {
set beresp.do_pass = true;
set beresp.uncacheable = true;
}
}
......
......@@ -345,6 +345,12 @@ sp_variables = (
( 'response',),
'const struct req *'
),
('beresp.uncacheable',
'BOOL',
( 'response',),
( 'response',),
'const struct req *'
),
('beresp.ttl',
'DURATION',
( 'response',),
......@@ -441,6 +447,12 @@ sp_variables = (
( ),
'const struct req *'
),
('obj.uncacheable',
'BOOL',
( 'lookup', 'deliver', 'error',),
( ),
'const struct req *'
),
('resp.proto',
'STRING',
( 'deliver',),
......
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