<div dir="ltr">You are welcome. Have fun.</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 Sat, Jan 23, 2016 at 12:14 AM, Raphaël Malié <span dir="ltr"><<a href="mailto:raphael.malie@gmail.com" target="_blank">raphael.malie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hi Guillaume,<br><br></div>It works, finally!<br><br></div>Many thanks,<br></div>Raphaël<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2016-01-22 21:50 GMT+01:00 Guillaume Quintard <span dir="ltr"><<a href="mailto:guillaume@varnish-software.com" target="_blank">guillaume@varnish-software.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Raphaël,<div><br></div><div>Varnish ignores the must revalidate header, if you wish to emulate the behaviour, you can use something like this in your vcl:</div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">sub vcl_backend_response {</font></div><div><font face="monospace, monospace"> if (beresp.http.cache-control ~ "must-revalidate") {</font></div><div><font face="monospace, monospace"> set beresp.ttl = 1s;</font></div><div><font face="monospace, monospace"> set beresp.grace = 0s;</font></div><div><font face="monospace, monospace"> set beresp.keep = 1w;</font></div><div><font face="monospace, monospace"> }</font></div><div><font face="monospace, monospace">}</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">This way, you'd only cache for 1 second (don't set it to 0, or all the requests for this object would be done sequentially), but will keep the object for a week, revalidating it each time it is requested and its ttl is expired.</font></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div>-- <br></div>Guillaume Quintard<br></div></div></div>
<br><div class="gmail_quote"><div><div>On Fri, Jan 22, 2016 at 3:32 PM, Raphaël Malié <span dir="ltr"><<a href="mailto:raphael.malie@gmail.com" target="_blank">raphael.malie@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr"><div><div><div><div><div><div>Hello,<br></div><br></div>I did a fresh install of Varnish 4.1 to test conditional requests with a last-modified header sent from the backend, here are my backend headers:<br><br>Cache-Control: must-revalidate, proxy-revalidate, public<br>Last-Modified: Fri, 22 Jan 2016 14:27:50 GMT<br><br></div>On the next query, Varnish should try to contact the backend with a if-modified-since header, and the backend shoud send back a "304 not modified" answer if nothing changed.<br><br></div>But Varnish never tries to contact the backend, he is always caching my page with the default ttl (120s).<br><br></div>Thank you for any help,<br></div>Raphaël<br></div>
<br></div></div>_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org" target="_blank">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>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>