varnish restart and cached objects

Simon Effenberg se at plista.com
Tue Apr 13 12:27:39 CEST 2010


hello,

i tried the following workflow:

- GET /bla.js

  vcl_recv  => lookup
  vcl_fetch => obj comes back but with a content-length of "0" so:
        if (obj.http.Content-Length == "0") {
                set obj.grace = 60s;
                restart;
        }

- wanted:
  vcl_recv  => grace is used so the already cached (but timed out over 
               ttl) object will be send out

- got 4x:
  vcl_recv  => lookup
  vcl_fetch => .. like above
  ...
  => client gets an Guru Meditation

I don't know how to force varnish to use the cached object even its ttl
is 0.

I'm using varnish 2.0.6 and for completion in vcl_recv req.grace is 12h
and vcl_fetch obj.grace is 12h.

Can anyone help me?

Thx a lot..


-- 
B.Sc. Simon Effenberg

Software-Developer

plista GmbH
Almstadtstraße 7
10119 Berlin
Germany

tel  +49 (0) 30 27577670
fax  +49 (0) 32 12 10 38 193
email: se at plista.com


plista GmbH, District Court of Berlin-Charlottenburg HRB 114726 B
Managing Director: Dominik Matyka, M.Sc.

This e-mail may contain confidential information. If you are not the
intended recipient please notify the sender immediately and destroy
this e-mail. Any unauthorised copying, disclosure or distribution of
the material in this e-mail is strictly forbidden.




More information about the varnish-misc mailing list