If-Modified-Since
Geoff Simmons
geoff at uplex.de
Thu Feb 24 16:32:20 CET 2011
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On 2/24/11 11:10 AM, Poul-Henning Kamp wrote:
> In message <4D662DA4.3030108 at uplex.de>, Geoff Simmons writes:
>
>> On 2/24/11 9:59 AM, Poul-Henning Kamp wrote:
>>> In message <4D6578CE.7070708 at uplex.de>, Geoff Simmons writes:
>>>
>>>> @phk: If we also implicitly set obj.conditional_timeout = 0 when obj.ttl
>>>> is set to 0, wouldn't existing VCL continue to do what people expect?
>>>
>>> Yes, I thought I had communicated that already: when ttl is set to <= zero,
>>> grace and conditional_timeout SHALL also be set to zero.
>>
>> You did indeed. So then my question is, is there a disadvantage to
>> allowing an object to be used for the IMS request if ttl and grace have
>> both elapsed, but conditional_timeout has not yet?
>
> yes, we don't know why it was expired.
To follow up for the list, we continued the discussion on IRC, and
Poul-Henning wants to be sure that if a ban has been requested for an
object, either with one of the purge commands or by setting obj.ttl=0 in
VCL, then it is expired and not used, regardless of the value of
conditional_timeout.
@phk: One more question. %^) We could do this by checking whether
obj.ttl was set to 0, or whether obj.ttl+obj.grace has elapsed. (We're
always passing over any object with a ban.) In other words, we could
reject the object if the expiration was specifically requested, but
otherwise use it if grace has not yet elapsed and there's still time
left for conditional_timeout; or we could reject it if grace has elapsed
for any reason.
In the first case, we would reject the object for IMS if:
o->ttl <= sp->t_req && HSH_Grace(o->grace) <= 0
In the second case, we reject it if:
o->ttl + HSH_Grace(o->grace) <= sp->t_req
In the second case, there's actually no point in having
obj.conditional_timeout > obj.grace; an object is evicted when grace
elapses, no matter what. In that case, we should *not* do something we
were talking about last week:
> - the cache eviction time for an object (oc->timer_when) becomes
> o->ttl + max(o->conditional_timeout, HSH_Grace(o->grace))
If eviction is only controlled by ttl and grace, then this should stay
the way it is now (oc->timer_when = o->ttl + HSH_Grace(o->grace)).
Best,
Geoff
- --
UPLEX Systemoptimierung
Schwanenwik 24
22087 Hamburg
http://uplex.de/
Mob: +49-176-63690917
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBCAAGBQJNZnoDAAoJEOUwvh9pJNURHLwQAINOkjg9OgXIxGLxufMBqcgY
++udavdBucBG24OSRv8L3gs7e7IkddI4u4mBY6T1/DlhN6KwXRWGSOlax7gD4boa
twG1qiAQSDtKfpV6e1ouDzjqAyu+EDfWyjT7L4fGOdWY5dsz9UkWEBgY9/OdGUv4
yOLq2lzZ+lWxFQ6iS3KlhcolsvmWJ8GD5aLcyxLZuYNulYPyTQVbqaUCrQYhCpS+
BMZOP1OVPI8BaXjR4vp0+n0DscayKoZbKe71/9qFB+8BJzHs4DBk/Q3U01FSowCp
xukZXG+Tj+YNXFpbHBLaVxJkIiHw4O9t3pC26o9THEWfcfpHNzArJe7xfrB3OV5w
5PrXYHJWUfsijK3D3FlgGpYCoHqQQ1vv61So/1yVQGA2mOIgleu7lvPAWOCvvAkF
qg6r2w+1qT6C+I6zm5GsoM+k+mzHD/HVfrJUIcRosMP28oDomtyJy+AZzUnDkbYL
JUfV8vCHc0yjvH/M/fuS7wOiy2ESUWFm/11zWqiQQq7WvZqJsS278yg1hirtu4Ry
7QeUJIJNyHJBdKEP8F+fr0Ner8yXDWrCzMBcAPC70KLeVthlLYkmqhlJI77x24Bg
MDbUm7P++HQ5cNntVhZkjnRaVVJK/9GjnQ8zyhibZ3x7GjtvTh4FRwMdBuGBmt6N
SK+xmP8+rEkx80aAPY8J
=TqZr
-----END PGP SIGNATURE-----
More information about the varnish-dev
mailing list