<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
After reading this mail and doing a lot more searching in the
mailinglist and on the web, I think it is actually rather simple. At
least I think that I'm seeing the correct behaviour. I'm not sure
though, it could be that the response is first generated and that
the origin is only checked after the response has been send to the
client. What I have now in my vcl_backend_response is nothing more
then:<br>
<br>
sub vcl_backend_response {<br>
if (beresp.http.Cache-Control ~ "must-revalidate") {<br>
set beresp.ttl = 1s;<br>
set beresp.keep = 3600s;<br>
set beresp.grace = 3600s;<br>
}<br>
return (deliver);<br>
}<br>
<br>
<br>
Jan Hugo Prins<br>
<br>
<br>
<br>
<div class="moz-cite-prefix">On 01/23/2017 02:20 PM, Geoff Simmons
wrote:<br>
</div>
<blockquote cite="mid:cc79bb48-02f3-2b78-9232-e4b72d1581f2@uplex.de"
type="cite">
<pre wrap="">On 01/23/2017 01:56 PM, Jan Hugo Prins | BetterBe wrote:
</pre>
<blockquote type="cite">
<pre wrap="">
Somewhere I found an old Trac Wiki document that describes
something like this, but I can't figure out if this has been
implemented or not.
<a class="moz-txt-link-freetext" href="https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests?version=8">https://www.varnish-cache.org/trac/wiki/BackendConditionalRequests?version=8</a>
</pre>
</blockquote>
<pre wrap="">
That
</pre>
<blockquote type="cite">
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">Wiki page is obsolete -- it was about an experimental branch that
was developed while Varnish 3 was the released version.
(Maybe we should delete the Wiki page, it's not the first time someone
has been led astray.)
Varnish has supported 304 responses to client requests with
If-Modified-Since/If-None-Match for as long as I've known about it
(going back to Varnish 2). Backend conditional requests have been
supported since Varnish 4.
However, by default that doesn't quite work as your flow chart
indicates, if I've understood it correctly. If the client request is
for a cached response with an unelapsed TTL, then Varnish delivers the
cached response unconditionally, without re-validating the response
with the backend. Conditional requests to backends are done for the
fetch after the TTL elapses.
That's the default, but I believe you can get your own VCL to
implement re-validation after cache hits. I haven't tried that myself
-- maybe someone reading the list has some working VCL they can share?
Best,
Geoff
</pre>
</blockquote>
<br>
<div class="moz-signature">-- <br>
<p style="font-family: Arial,Roboto;font-size: 13px;color:
#000000;line-height:
20px;margin:0px;margin-top:20px;margin-bottom:50px;"> Met
vriendelijke groet / Best regards,<br>
<br>
Jan Hugo Prins<br>
<i>Infra and Storage consultant</i>
</p>
<table style="min-width:460px;" border="0" cellpadding="0"
cellspacing="0" width="460">
<tbody>
<tr>
<td colspan="3" style="padding-bottom:40px;"><a
href="https://www.betterbe.com"><img
src="cid:part1.18883F2B.3F2277BB@betterbe.com"
alt="BetterBe - Transforming automotive leasing
worldwide"></a></td>
</tr>
<tr>
<td style="padding-right:40px;font-family:
Arial,Roboto;font-size: 12px;color:
#332F60;letter-spacing: 0.1px;line-height:
1em;padding-bottom:5px;"><nobr>Auke Vleerstraat 140 E</nobr></td>
<td style="padding-right:40px;font-family:
Arial,Roboto;font-size: 12px;color:
#332F60;letter-spacing: 0.1px;line-height:
1em;padding-bottom:5px;"><nobr><b>T</b> <a
href="tel:+31%20%280%29%2053%2048%2000%20694"
style="text-decoration:none;color:#332F60;">+31 (0) 53
48 00 694</a></nobr></td>
</tr>
<tr>
<td style="padding-right:40px;font-family:
Arial,Roboto;font-size: 12px;color:
#332F60;letter-spacing: 0.1px;line-height:
1em;padding-bottom:5px;"><nobr>7547 AN Enschede</nobr></td>
<td style="padding-right:40px;font-family:
Arial,Roboto;font-size: 12px;color:
#332F60;letter-spacing: 0.1px;line-height:
1em;padding-bottom:5px;"><nobr><b>E</b> <a
href="mailto:jprins@betterbe.com"
style="text-decoration:none;color:#332F60;">jprins@betterbe.com</a></nobr></td>
</tr>
<tr>
<td style="padding-right:40px;font-family:
Arial,Roboto;font-size: 12px;color:
#332F60;letter-spacing: 0.1px;line-height:
1em;padding-bottom:5px;"><nobr>CC no. <a
href="https://www.kvk.nl/orderstraat/product-kiezen/?kvknummer=080975270000"
style="text-decoration:none;color:#332F60;">08097527</a></nobr></td>
<td style="padding-right:40px;font-family:
Arial,Roboto;font-size: 12px;color:
#332F60;letter-spacing: 0.1px;line-height:
1em;padding-bottom:5px;"><nobr><b>M</b> <a
href="tel:+31%20%280%296%2026%20358%20951"
style="text-decoration:none;color:#332F60;">+31 (0)6
26 358 951</a></nobr></td>
<td style="font-family: Arial,Roboto;font-size: 12px;color:
#332F60;letter-spacing: 0.1px;line-height:
1em;padding-bottom:5px;"><a
href="https://www.betterbe.com" style="color:
#E73C57;font-weight:bold;text-decoration:none;">www.betterbe.com</a></td>
</tr>
<tr>
<td colspan="3" style="font-family: Arial,Roboto;font-size:
9px;color: #A0A6B2;letter-spacing: 0;line-height:
1.5em;padding-top:40px;"> BetterBe accepts no liability
for the content of this email, or for the consequences of
any actions taken on the basis of the information
provided, unless that information is subsequently
confirmed in writing. If you are not the intended
recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the
contents of this information is strictly prohibited. </td>
</tr>
</tbody>
</table>
</div>
</body>
</html>