Problem with varnish and caching

Manuel Amador (Rudd-O) rudd-o at rudd-o.com
Fri Jun 29 21:41:10 CEST 2007


As you might already have noted, I reported a bug on varnish caching
files indiscriminately.

I now have a different problem.

My page sets a few cookies.  That'd be okay and it should produce
dynamic pages, which Varnish is furnishing through my backend.  The
thing is, these cookies are sent along requests for CSS and PNG and JPG
and JS files, which causes varnish to contact the backend.  I don't want
that to happen (I'm happy with them being cached by Varnish 120
seconds).

How can I tell Varnish that requests with a response that includes ETag
(a discriminant for static files) should be forcibly cached?

The VCL man page makes no mention of any discriminant variable I could
use in any of varnish's subroutines that will let me forcibly have them
served from the cache.

Again: I want files that apache responded with an ETag to be forcibly
cached, no matter if my client sends cookies along or not.

luck,

	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: 
You will engage in a profitable business activity.
-------------- 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-dev/attachments/20070629/ac540ae2/attachment-0003.pgp>


More information about the varnish-dev mailing list