Problem with varnish and caching

Manuel Amador (Rudd-O) rudd-o at rudd-o.com
Sun Jul 1 02:10:16 CEST 2007


Whether this is part of a different specification or not, it's
unreasonable for Varnish to NOT cache static, cacheable objects by
default, solely because these requests were sent along with Cookies.

In effect, the default Varnish policy of not caching Cookied requests
causes Varnish not to cache anything at all for most sites (you know,
there are tons of people out there using Google Analytics).  Think about
it: why would people want the overhead of a non-caching accelerating
proxy?

On sáb, 2007-06-30 at 23:41 +0200, Dag-Erling Smørgrav wrote:
> [moved from -dev to -misc]
> 
> "Manuel Amador (Rudd-O)" <rudd-o at rudd-o.com> writes:
> > As you might already have noted, I reported a bug on varnish caching
> > files indiscriminately.
> 
> This is not a bug, it is a misunderstanding.  It appears you expect
> Varnish to act like an RFC 2616 "shared cache" whereas it is in fact a
> "surrogate" (see the "Edge Architecture Specification" by Oracle and
> Akamai, although Varnish does not yet fully implement that specification
> either)
> 
> > 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?
> 
> This is basically the same issue as in your previous email, and the
> answer is the same.
> 
> DES
	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: 
Small things make base men proud.
		-- William Shakespeare, "Henry VI"
-------------- 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/20070630/10af24f2/attachment-0001.pgp>


More information about the varnish-misc mailing list