caching of request with cookies

Tollef Fog Heen tfheen at varnish-software.com
Thu Sep 30 08:29:45 CEST 2010


]] Harm Verhagen 

Hi,

[...]

| I do think a reverse proxy project should also support systems that are
| trying to behave ideally.

Sure, which is why you can write VCL.  We give you a default policy that
is a bit on the conservative side.  The advantage being that it actually
works with more existing solutions.

| However most (all?)  of the VCL examples found on the varnish site, and even
| VCL examples on forums, are about how to trick varnish into caching when the
| system 'misbehaves'.

Sure, this is because most systems do misbehave.  Sad fact of life.

| This is good & usefull, but somehow  the systems that try to follow the http
| spec are overseen in the docs.
| 
| So i'm actually a) looking for a VCL example for systems that try to behave
| ideally.  and b) a request to promote this in the documentation.

For a), take the default VCL, drop the if (req.http.cookie) bit from
vcl_recv.  If Django sends out pages which start sessions with a
s-maxage of 0, you should be able to drop the check for set-cookie in
vcl_fetch too.f

As for b), file bugs in the bug tracker, preferably with patches. :-)

Regards,
-- 
Tollef Fog Heen
Varnish Software
t: +47 21 54 41 73




More information about the varnish-dev mailing list