Saint mode

Poul-Henning Kamp phk at phk.freebsd.dk
Tue Sep 1 10:58:21 CEST 2009


In message <22964b960908311958r211f8ac9g1b6eee46ed92d158 at mail.gmail.com>, Javie
r Frias writes:

>Specifically, we are looking to not store bad documents unless we have to,
>iow, not replace a known good document ( status 200 or 404 ), with a bad
>document ( status 503 ), if it would otherwise would be served from grace.

503's are never cached to my knowledge.

the rest can be obtained by:

	sub vcl_fetch {
		if (beresp.status != 200 && beresp.status != 404) {
			set beresp.ttl = 0;
			return (pass);
		}
	}

-- 
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.



More information about the varnish-dev mailing list