hit for pass problems (was: Problems getting Varnish to cache certain things)

Anders Nordby anders at fupp.net
Wed Jun 24 15:11:18 CEST 2009


Hi,

On Wed, Jun 17, 2009 at 08:32:07PM +0000, Poul-Henning Kamp wrote:
>>> Only pass in vcl_fetch will create a "hit for pass" object.
>>Hrm. When did this change? We tested and confirmed in 2.0.3(?) that
>>pass'ing out of vcl_hit caused the hit-for-pass behaviour.
> The object will not be marked as hit-for-pass if you do that, but
> the resulting behaviour is the same, so unless you inspect stats,
> you cannot tell the difference.

I am trying to set ttl before doing pass in vcl_fetch, at all places in
vcl_fetch where I do pass. Like for example:

        if (!beresp.cacheable) {
                set beresp.ttl = 1200s;
                pass;
        }

But still, it happens that Varnish will not cache objects, unless I
restart it (I waited more than the above TTL value). If I try to purge
those URLs, Varnish answers with HTTP 501 Not Supported. After I restart
Varnish, I can purge the same URL again. Would much prefer not to
have to restart Varnish once I run into a URL that we have difficulties
to get Varnish to cache. :-/

Regards,

-- 
Anders.


More information about the varnish-misc mailing list