<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">(redirecting the response to
varnish-misc, where the question would have belonged)<br>
</div>
<div class="moz-cite-prefix"><br>
</div>
<div class="moz-cite-prefix">On 14/10/2019 16:13, Santosh Abraham
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAPiWoKdWiexoHLOd2TNbi-TZf=U23CJmMZD833rB4PFtyhGaiQ@mail.gmail.com"><span
style="font-size:11pt">Using <b>BAN</b>, is it possible to
invalidate a particular variant of a varnish cache?</span></blockquote>
<p>What you are trying to do should just work, and I cannot spot an
error in your VCL with regards to the ban handling.</p>
<p>But your use of the Vary header looks wrong, It is not a request
header but rather a response header (which you need to set in
vcl_backend_response) and also the value if the Vary header is the
name of a request header.</p>
<p>So in your case it should be something like:</p>
<pre>sub vcl_backend_response {
if (beresp.http.Vary) {
set beresp.http.Vary = beresp.http.Vary + ", <span style="font-size:11pt">X-BOLT-SITE-LOCALE";
} else {
set beresp.http.Vary = </span><span style="font-size:11pt"><span style="font-size:11pt">"X-BOLT-SITE-LOCALE";</span></span>
}
}
</pre>
<p>Nils<br>
</p>
</body>
</html>