Skip to content

Instantly share code, notes, and snippets.

@rezan
Created November 29, 2018 18:44
Show Gist options
  • Save rezan/965495881a89e28b47421a83cb31af19 to your computer and use it in GitHub Desktop.
Save rezan/965495881a89e28b47421a83cb31af19 to your computer and use it in GitHub Desktop.
Test hit for miss (6.0)
varnishtest "Test hit for miss (6.0)"
server s1 -repeat 5 {
rxreq
txresp
} -start
varnish v1 -vcl+backend {
sub vcl_backend_response {
set beresp.uncacheable = true;
}
} -start
client c1 {
txreq
rxresp
txreq
rxresp
txreq
rxresp
txreq
rxresp
txreq
rxresp
} -run
varnish v1 -expect client_req == 5
varnish v1 -expect n_object == 5
varnish v1 -expect cache_miss == 5
varnish v1 -expect cache_hitmiss == 4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment