<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 26, 2014 at 7:59 PM, Nils Goroll <span dir="ltr"><<a href="mailto:slink@schokola.de" target="_blank">slink@schokola.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">(..)<br>
I think we should make this consistent and easier to understand.<br>
<br>
One simple idea to regain consistency would be to make a "set beresp.ttl" do<br>
what a read on obj.ttl gives us: the time remaining in cache (ie add the Age to<br>
the internal ttl).<br></blockquote><div><br></div><div><br></div><div>While I see the point the issue is further complicated by the grace and keep timeouts, which in effect extends the TTL. This is much more of a real issue now that the default VCL will serve an object past the TTL using the builtin VCL. </div>
<div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
In addition to that (or even replacing the VCL ttl) I like the idea to add two<br>
(additional) variables:<br>
<br>
* (beresp|obj).age : corresponding to the Age header, the current Age<br>
of the Object<br></blockquote><div><br></div><div>If obj.ttl could reflect the real ttl and obj.age is exposed then we could have vcl_hit look like:</div><div><br></div><div><div>if (obj.ttl - obj.age >= 0s) {</div>
<div> return (deliver);<br></div><div>}</div><div>if (obj.ttl + obj.grace - obj.age > 0s) {</div><div> // Object is in grace, deliver it</div><div> // Automatically triggers a background fetch</div>
<div> return (deliver);</div><div>}</div></div><div><br></div><div>This would have the advantage that everyone would immediately see how TTL and age work together. It would still make sense to have the calculated TTL available of course, but more for convenience.</div>
<div><br></div></div>Per.<br clear="all"><div><br></div>-- <br><div dir="ltr"><div style="font-size:12.727272033691406px;margin:5px 15px 0px 0px;padding-bottom:5px;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
<table border="0" cellpadding="0" cellspacing="0" style="text-align:start;font-size:12px;line-height:1.5em;font-family:'Helvetica Neue',Arial,sans-serif;color:rgb(102,102,102);width:550px;border-top-width:1px;border-top-style:solid;border-top-color:rgb(238,238,238);border-bottom-width:1px;border-bottom-style:solid;border-bottom-color:rgb(238,238,238);margin-top:20px;padding-top:5px;padding-bottom:5px">
<tbody><tr><td width="100" style="font-family:arial,sans-serif;margin:0px"><a href="http://www.varnish-software.com/" style="color:rgb(17,85,204)" target="_blank"><img src="http://www.varnish-software.com/static/media/logo-email.png" style="float: left; margin-left: 10px;"></a></td>
<td style="font-family:arial,sans-serif;margin:0px"><b style="font-size:14px;color:rgb(34,34,34)">Per Buer</b><br>CTO | Varnish Software<br>Phone: +47 958 39 117 | Skype: per.buer<br><span style="font-weight:bold">We Make Websites Fly!<br>
<br></span><span style="font-family:'Helvetica Neue',Arial,sans-serif;font-size:14px;font-weight:bold">Winner of the Red Herring Top 100 Global Award 2013<br></span><p style="margin:0px;line-height:normal;font-family:Helvetica">
<img src="https://www.varnish-software.com/sites/default/files/redherring_2013_winner_sml.jpg"></p><span style="font-weight:bold"><br></span></td></tr></tbody></table><div></div></div><div style="font-size:12.727272033691406px;margin:15px 0px;clear:both;color:rgb(34,34,34);font-family:arial,sans-serif;background-color:rgb(255,255,255)">
</div></div>
</div></div>