vcl and cache-control header
Poul-Henning Kamp
phk at phk.freebsd.dk
Tue Apr 24 21:19:45 CEST 2007
In message <766F093C-6960-4FFB-ACA8-B014184CE85F at zeno.org>, Denis Ahrens writes
:
>Hi
>
>I have problems with the following vcl-script:
>
> if(req.http.Cache-Control == "max-age=0") {
> set obj.ttl = 0s;
> pass;
> }
Guys, when you quote VCL code, please also tell us which
function you do this in...
>With this snippet in vcl-hit EVERY obj will get fetched (if there is
>a Cache-Control header or not). Even when I change the code to
>
> if(req.http.Cache-Control == "thiscanbeneverfound") {
> set obj.ttl = 0s;
> pass;
> }
>
>EVERY obj is fetched from the backend.
Sounds bogus, can you please enable the vcl_trace parameter
and send me a varnishlog -o output ?
--
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