On 27/08/14 09:23, Per Buer wrote:
>
> If obj.ttl could reflect the real ttl and obj.age is exposed then we could
> have
> vcl_hit look like:
>
> if (obj.ttl - obj.age >= 0s) {
> return (deliver);
> }
> if (obj.ttl + obj.grace - obj.age > 0s) {
> // Object is in grace, deliver it
> // Automatically triggers a background fetch
> return (deliver);
> }
>
would it work for you if you could write this as
if (obj.maxage - obj.age >= 0s) {
return (deliver);
}
if (obj.maxage + obj.grace - obj.age > 0s) {
// Object is in grace, deliver it
// Automatically triggers a background fetch
return (deliver);
}
?
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev