Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P8793
30-purge-hash_data.vtc
Active
Public
Actions
Authored by
•
ema
on Jul 24 2019, 11:36 AM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F29860556: raw.txt
Jul 24 2019, 11:36 AM
2019-07-24 11:36:15 (UTC+0)
Subscribers
None
varnishtest "Cache key and PURGE"
server s1 {
rxreq
expect req.url == "/1"
txresp
} -start
varnish v1 -arg "-p vcl_path=${vcl_path} -p vcc_err_unref=false -p vcc_allow_inline_c=true -p cc_command='${cc_command}'" -vcl+backend {
backend vtc_backend {
.host = "${s1_addr}"; .port = "${s1_port}";
}
include "${basepath}/usr/share/varnish/tests/wikimedia_misc-backend.vcl";
}
# Attach the "wikimedia_misc" label to wikimedia_misc-backend.vcl
varnish v1 -cli "vcl.label wikimedia_misc vcl1"
varnish v1 -vcl {
backend vtc_backend {
.host = "${s1_addr}"; .port = "${s1_port}";
}
include "${basepath}/usr/share/varnish/tests/wikimedia_text-backend.vcl";
} -start
client c1 {
txreq -url "/1" -hdr "X-Subdomain: m" -hdr "Cookie: optin=beta"
rxresp
expect resp.status == 200
expect resp.http.X-Cache-Int ~ "miss"
txreq -url "/1" -hdr "X-Subdomain: m" -hdr "Cookie: optin=beta"
rxresp
expect resp.status == 200
expect resp.http.X-Cache-Int ~ "hit"
txreq -req PURGE -url "/1"
rxresp
expect resp.status == 204
txreq -url "/1" -hdr "X-Subdomain: m" -hdr "Cookie: optin=beta"
rxresp
expect resp.status == 200
# This should have been a miss!
expect resp.http.X-Cache-Int ~ "hit"
} -run
Event Timeline
•
ema
created this paste.
Jul 24 2019, 11:36 AM
2019-07-24 11:36:15 (UTC+0)
•
ema
mentioned this in
T228861: Do not cache the beta version of the mobile site
.
Jul 24 2019, 12:13 PM
2019-07-24 12:13:23 (UTC+0)
Log In to Comment