Caching issue

Shain Miley SMiley at
Sat Mar 8 03:17:35 CET 2008

Thanks alot for the help...I have been trying some of these ideas with little success...even the simple example of 'lookup everything in vcl_recv' did not work...seems to me that should check the cache for everything it receives..which it might have been doing....but it still showed a cache miss..and showed me the 503 error...does anyone know how the matching works...does it only take a hash of the url..or does it use more then that...


-----Original Message-----
From: varnish-dev-bounces at on behalf of Daniel Papasian
Sent: Fri 3/7/2008 5:53 PM
To: Adrian Otto
Cc: varnish-dev at
Subject: Re: Caching issue
Adrian Otto wrote:
> I'm not certain if there is a VCL configuration that would cause varnish to  
> simply disregard the Pragma and Cache-Control headers from the  
> client, because anyone doing a shift+reload while your origin server  
> is down is going to get sent back to the origin server as well.

No, I believe it's a simple matter to simply disregard the Pragma and 
Cache-Control headers on incoming requests.  Most

Most simply, if you wanted to have every request do a lookup from the cache:

sub vcl_recv {

If the default.vcl I have lying around is still current, then the 
default vcl_recv doesn't appear to be looking at Cache-Control or 
Pragma, either.

But obviously you probably want to do some checks against 
req.http.Cache-Control, req.http.Pragma, req.http.cookie, and perhaps 
any other request header, before just blindly doing a lookup in the 
cache.  There are cases, however, where blindly doing a lookup could 
make sense - such as when you are in full control of not only all of the 
backends, but also all of the clients (e.g. you are putting varnish in 
front of a web application that is used by another one of your systems)

varnish-dev mailing list
varnish-dev at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the varnish-dev mailing list