Commit a3607f03 authored by Martin Blix Grydeland's avatar Martin Blix Grydeland Committed by Tollef Fog Heen

Reintroduce TTL VCL logging that was lost in commit

a21746d2.

Fixes: #941
parent 58d36cb3
......@@ -385,10 +385,13 @@ VRT_DO_EXP(req, sp->exp, ttl, )
VRT_DO_EXP(req, sp->exp, grace, )
VRT_DO_EXP(req, sp->exp, keep, )
VRT_DO_EXP(obj, sp->obj->exp, grace, EXP_Rearm(sp->obj))
VRT_DO_EXP(obj, sp->obj->exp, ttl, EXP_Rearm(sp->obj))
VRT_DO_EXP(obj, sp->obj->exp, ttl,
EXP_Rearm(sp->obj);
WSP(sp, SLT_TTL, "%u VCL %.0f %.0f", sp->obj->xid, a, sp->t_req))
VRT_DO_EXP(obj, sp->obj->exp, keep, EXP_Rearm(sp->obj))
VRT_DO_EXP(beresp, sp->wrk->exp, grace, )
VRT_DO_EXP(beresp, sp->wrk->exp, ttl, )
VRT_DO_EXP(beresp, sp->wrk->exp, ttl,
WSP(sp, SLT_TTL, "%u VCL %.0f %.0f", sp->xid, a, sp->t_req))
VRT_DO_EXP(beresp, sp->wrk->exp, keep, )
/*--------------------------------------------------------------------
......
varnishtest "beresp.ttl set in vcl takes effect"
server s1 {
rxreq
txresp -hdr "Cache-control: max-age=1" -body "FOO"
rxreq
txresp -body "FOOBAR"
} -start
varnish v1 -vcl+backend {
sub vcl_fetch {
set beresp.ttl = 1000s;
}
} -start
client c1 {
txreq
rxresp
expect resp.bodylen == 3
delay 2
txreq
rxresp
expect resp.bodylen == 3
} -run
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