Problem with varnish and caching

Manuel Amador (Rudd-O) rudd-o at
Sun Jul 1 21:12:44 CEST 2007


But my data seems to contradict your assumption that my assumptions are
flawed, since for each request on my Varnish log, there's a matching
request on my Apache log.

If Varnish isn't accelerating anything (not even static content) due to
Cookies, then... hmmmm.... all that fancy new-world engineering
architecture  is useless.  By the way, I find the Varnish cache
architecture absolutely sensible and I commend you guys for it in
earnest, Squid should work like that.

At the moment I have found a temporary hackish solution where:

                if (req.http.Cookie ~ "wordpresspass") {

                if (req.http.Authenticate) {

                if (req.http.Expect) {

                if (req.http.Pragma ~ "no-cache") {


And it seems to be working fine (see the "wordpresspass" regexp match
for the cookie).

By the way, the manual page doesn't explain the difference between pipe
and pass.  Yes, technically it explains the difference, but it doesn't
discuss the implications of the difference for the caching subsystem,
and the implications aren't obvious.  I initially used "pass" but that
made my pages malfunction, so I reverted to pipe (which was
counterintuitive).  I was expecting "pass" to feed data straight from
the Web server to the client without caching the data, and for some
reason my site malfunctioned (redirects didn't work, logins didn't work,
etcetera).  I verified these statements using Wireshark.

On dom, 2007-07-01 at 10:53 +0200, Dag-Erling Smørgrav wrote:
> "Manuel Amador (Rudd-O)" <rudd-o at> writes:
> > 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?
> Perhaps your assumptions are flawed?
	Manuel Amador (Rudd-O) <rudd-o at>
	The R Zone -
	GPG key ID 0xC8D28B92 at

Now playing, courtesy of Amarok: UB40 - Reggae music
O, what a tangled web we weave, When first we practice to deceive.
		-- Sir Walter Scott, "Marmion"
-------------- 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: <>

More information about the varnish-misc mailing list