Skip to content
Browse files

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

variables.
  • Loading branch information...
1 parent 6c6a41a commit 20bb2a0b0da9100c070a575da17c2c411f542903 @bsdphk bsdphk committed Apr 3, 2013
View
9 bin/varnishd/cache/cache_vrt_var.c
@@ -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)
/*--------------------------------------------------------------------*/
@@ -554,6 +555,14 @@ VRT_r_obj_lastuse(const struct req *req)
}
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)
{
CHECK_OBJ_NOTNULL(req, REQ_MAGIC);
View
2 bin/varnishtest/tests/c00011.vtc
@@ -11,7 +11,7 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_response {
- set beresp.do_pass = true;
+ set beresp.uncacheable = true;
}
} -start
View
2 bin/varnishtest/tests/c00014.vtc
@@ -15,7 +15,7 @@ server s1 {
varnish v1 -vcl+backend {
sub vcl_response {
- set beresp.do_pass = true;
+ set beresp.uncacheable = true;
}
} -start
View
2 bin/varnishtest/tests/e00011.vtc
@@ -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
View
2 bin/varnishtest/tests/r00318.vtc
@@ -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
View
2 bin/varnishtest/tests/r01206.vtc
@@ -40,7 +40,7 @@ server s1 -start
varnish v1 -vcl+backend {
sub vcl_response {
- set beresp.do_pass = true;
+ set beresp.uncacheable = true;
}
}
View
12 lib/libvcl/generate.py
@@ -345,6 +345,12 @@
( 'response',),
'const struct req *'
),
+ ('beresp.uncacheable',
+ 'BOOL',
+ ( 'response',),
+ ( 'response',),
+ 'const struct req *'
+ ),
('beresp.ttl',
'DURATION',
( 'response',),
@@ -441,6 +447,12 @@
( ),
'const struct req *'
),
+ ('obj.uncacheable',
+ 'BOOL',
+ ( 'lookup', 'deliver', 'error',),
+ ( ),
+ 'const struct req *'
+ ),
('resp.proto',
'STRING',
( 'deliver',),

0 comments on commit 20bb2a0

Please sign in to comment.
Something went wrong with that request. Please try again.