Wiki hash_always_miss

Bob Camp lists at rtty.us
Fri Nov 5 01:29:45 CET 2010


Hi

The wiki shows:

# Command to refresh cached front page
$ GET -H 'X-REFRESH: DOIT' http://my.site.com/

# VCL
sub vcl_recv {
    if (req.http.X-REFRESH) {
        # Force a cache miss
        
set req.hash_always_miss
 = 1;
    }
}

That does not work. 

The varnishtest test suite shows:

  sub vcl_recv {
	                if (req.http.x-missit == "1") {
	                        set req.hash_always_miss = true;
	                }
	        }

Setting it to true rather than 1 does indeed work.

Bob




More information about the varnish-misc mailing list