Hi,<div><br><br><div class="gmail_quote">On Thu, Sep 15, 2011 at 3:19 PM, Barak Yaish <span dir="ltr"><<a href="mailto:barak.yaish@gmail.com">barak.yaish@gmail.com</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

<div dir="ltr"><div><br></div><div>I'm new to Varnish, and I didn't find in the docs how to do the following - cache the response based on customized HTTP header (which the backend may or may not set), for example cache the response in case the one of the response headers is "SomeHeader".</div>

</div></blockquote><div><br></div><div>How will Varnish know the value of the response header before it has talked to the backend?</div><div><br></div><div>Cache lookups happend after we get the request, and at that time the response headers are unknown. You need to figure out what content to deliver purely based on the request.</div>

</div><div><br></div>-- <br><img src="http://www.varnish-software.com/sites/default/files/varnishsoft_white_190x47.png"><div>Per Buer, CEO<br>Phone: +47 21 98 92 61 / Mobile: +47 958 39 117 / Skype: per.buer<br><i>Varnish makes websites fly!</i><div>

<a href="http://www.varnish-software.com/whitepapers" target="_blank">Whitepapers</a> | <a href="http://www.youtube.com/watch?v=x7t2Sp174eI" target="_blank">Video</a> | <a href="https://twitter.com/varnishsoftware" target="_blank">Twitter</a> <br>

<br></div></div><br>
</div>