<div dir="ltr">Hi Magnus,<div><br></div><div>The documention you are looking for is here : <a href="https://www.varnish-cache.org/docs/4.0/reference/vcl.html">https://www.varnish-cache.org/docs/4.0/reference/vcl.html</a></div><div><br></div><div>And beresp.keep is definitely what you are looking for. If ttl is expired but not ttl + keep, varnish will issue a conditionnal request.</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div>
<br><div class="gmail_quote">On Fri, Sep 18, 2015 at 12:35 PM, Magnus Hoff <span dir="ltr"><<a href="mailto:maghoff@gmail.com" target="_blank">maghoff@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi :)<br>
<br>
What is the status of support for conditional backend requests?<br>
<br>
My use case is accelerating CouchDB, which has good support for ETags,<br>
but offers no other caching opportunities.<br>
<br>
I have found [1] which leads me to think that the branch implementing<br>
this feature was merged to trunk in 2011. According to [2] (which also<br>
says, in big bold letters, "This documentation is out of date"), I<br>
should be able to see this working with the default VCL: "In the<br>
default case (i.e. if not superseded by something in VCL), a<br>
conditional request is generated during fetch with If-Modified-Since<br>
and/or If-None-Match headers whose values are taken from stale_obj's<br>
Last-Modified and/or ETag headers."<br>
<br>
[1]: <a href="https://www.varnish-cache.org/lists/pipermail/varnish-commit/2011-July/006720.html" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/pipermail/varnish-commit/2011-July/006720.html</a><br>
[2]: <a href="https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests" rel="noreferrer" target="_blank">https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests</a><br>
<br>
However, when testing with the latest Varnish from the Varnish Ubuntu<br>
repository (<a href="https://www.varnish-cache.org/installation/ubuntu" rel="noreferrer" target="_blank">https://www.varnish-cache.org/installation/ubuntu</a>),<br>
"varnish-4.0.3 revision b8c4a34", I am unable to trigger conditional<br>
backend requests in the default configuration. I have feebly tried<br>
making the VCL more explicit in that it should try to keep the ETagged<br>
versions around by setting beresp.keep explicitly, but I can't seem to<br>
effect a change in behavior.<br>
<br>
So, what is happening? Does Varnish currently support what I am<br>
looking for? What is the up to date documentation on this? Is there<br>
support for this on a branch still? How is that branch coming along?<br>
<br>
<br>
Thank you :)<br>
- Magnus Hoff<br>
<br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" rel="noreferrer" target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</blockquote></div><br></div>