Support Cache-Control no-cache/private as per RFC2616 ?

BUSTARRET, Jean-francois jfbustarret at
Mon Nov 19 17:50:13 CET 2007

Yet says "Varnish was written from the ground up to be a high performance caching reverse proxy." Varnish is a cache, and should follow HTTP/1.1 RFCs. also references these features :
355	MUST NOT	14.9.1	cache responses with cache-control: private
356	MUST NOT	14.9.1	use responses with cache-control: no-cache to satisfy other requests without successful revalidation

I don't see a problem of having to have the Cache-control logic written in VCL, as long as :
- the default configuration uses it (or the vcl code is in the man pages, not in google). 
- it is as fast as C code (vcl is compiled, so it's ok)
- I don't have to use regexps. For now, I have to use two of them : (obj.http.Pragma ~ "no-cache" || obj.http.Cache-Control ~ "no-cache" - I am not using Cache-control: private), but two strpos-like would do the job, with less overhead.


> -----Message d'origine-----
> De : varnish-misc-bounces at 
> [mailto:varnish-misc-bounces at] De la part 
> de Poul-Henning Kamp
> Envoyé : lundi 19 novembre 2007 17:20
> À : BUSTARRET, Jean-francois
> Cc : varnish-misc at
> Objet : Re: Support Cache-Control no-cache/private as per RFC2616 ? 
> In message 
> <53C652A09719C54DA24741D0157CB2695FF981 at>,
>  "BUSTARRET, Jean-francois" writes:
> >"If the no-cache directive does not specify a field-name, 
> then a cache 
> >MUST NOT [...]
> Varnish is not a cache in the RFC2616 sense.  It more of an 
> extension of the web-server, which is probably best thought 
> of as "a webserver that picks up its contents with HTTP".
> Therefore, a lot of what RFC2616 has to say about caches do 
> not apply to Varnish.
> The key distinction is that a RFC2616 cache is not under the 
> content providers control, so it must follow whatever 
> intructions he gives in the HTTP headers, whereas Varnish is 
> under his control and he therefore has other means of 
> instruction (notably VCL).
> -- 
> Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG         | TCP/IP since RFC 956
> FreeBSD committer       | BSD since 4.3-tahoe    
> Never attribute to malice what can adequately be explained by 
> incompetence.
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at

More information about the varnish-dev mailing list