obj.cacheable vs expires headers?
lstroobant at gmail.com
Mon Feb 8 21:39:28 CET 2010
Poul-Henning Kamp wrote:
> 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
> 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.
So you mean: the object /can/ be cached, but it would only be cached for
>> 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.
I don't think it's a clock issue. Varnish and the webserver are running
on the same host. We wanted to use Varnish to cache some static files on
an overloaded prefork Apache + mod-php (and it did a great job, till we
started to see weird session issues).
More information about the varnish-misc