Problem with varnish and caching

Manuel Amador (Rudd-O) rudd-o at rudd-o.com
Tue Jul 3 18:27:03 CEST 2007


Thanks, Anup.  I did read the vcl man page several times.  The technical
problem with Varnish is that, if I set it up to cache things even if
Cookies are present, my site malfunctions because pages for logged-in
users are cached.  I have to make the caching conditional to the login
Cookie specifically (I did use a conditional "hack" to get this in
default.vcl) otherwise the site completely malfunctions.

The optimum behaviour would be Varnish caching static files
(img,css,jpg,png, based on response HTTP headers) and not caching
dynamic ones.  But as it currently stands, Varnish configuration
language doesn't allow caching to be controlled based on the response
headers, only on the request ones.  Squid, however, does.

On mar, 2007-07-03 at 10:12 +0530, Anup Shukla wrote:
> Manuel Amador (Rudd-O) wrote:
> > site is cached according to Varnish default policies.  You have not
> > provided a single counterexample or a single snippet of VCL that could
> > solve the problems I have, or a single snippet of VCL that you guys are
> > actually using on production servers.
> >
> >   
> "man vcl" does provide an example about how to cache even if Cookies are 
> present.
> Did i miss something?
> 
> Regards
> A.S
	Manuel Amador (Rudd-O) <rudd-o at rudd-o.com>
	The R Zone - http://rudd-o.com/
	GPG key ID 0xC8D28B92 at http://wwwkeys.pgp.net/

Now playing, courtesy of Amarok: 
Q:	What do you say to a New Yorker with a job?
A:	Big Mac, fries and a Coke, please!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20070703/54f915b1/attachment-0001.pgp>


More information about the varnish-misc mailing list