obj.cacheable vs expires headers?

Poul-Henning Kamp phk at phk.freebsd.dk
Mon Feb 8 20:29:19 CET 2010


In message <4B707314.5090205 at gmail.com>, Luc Stroobant writes:

>obj.ttl seems to be zero indeed, but I still don't get how his would 
>make the request cacheable. At least it's not the behaviour one would 
>expect?

We distinguish between "can be cached" and "how long should it be cached"
because they are very different questions.

"can be cached" is a matter of correctness, whereas "how long" is 
just a performance issue.

>Secondly: I also thought that Varnish never caches requests with a 
>Set-cookie header?

Varnish has a special kind of cache entries called "hit-for-pass".
This is a cache entry that says that the object can not be cached,
that solves a pile-up issue on busy objects.

The fact that you see zero TTL, can be indicative of the clock on
the varnish-host and the clock on the backend not agreeing what
time it is.  Check your ntpd.


-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.



More information about the varnish-misc mailing list