Created
August 11, 2017 14:49
-
-
Save rezan/2dbfc726468a9742e5478b57be362d07 to your computer and use it in GitHub Desktop.
Setting grace from the backend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
varnishtest "Setting grace from the backend" | |
server s1 { | |
rxreq | |
txresp -hdr "Cache-Control: max-age=60, stale-while-revalidate=15" | |
} -start | |
varnish v1 -vcl+backend { | |
sub vcl_backend_response { | |
set beresp.http.X-ttl = beresp.ttl; | |
set beresp.http.X-grace = beresp.grace; | |
} | |
} -start | |
client c1 { | |
txreq | |
rxresp | |
expect resp.status == 200 | |
expect resp.http.X-ttl == "60.000" | |
expect resp.http.X-grace == "15.000" | |
} -run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment