1

I have understand when someone uses return(pass) is because want not cache the content and pass the request to the backend. So, if this is really so, why a I get HIT in place of MISS. Here es my vcl:

sub vcl_recv{
 if (req.method == "GET" && req.method == "HEAD"){
            return (pass);
    }

}

Here a part of varnishlog:

  • VCL_call RECV
  • VCL_return hash
  • VCL_call HASH
  • VCL_return lookup
  • Hit 20
  • VCL_call HIT
  • VCL_return deliver

Thank you.

Little crazy
  • 113
  • 2
  • 7

1 Answers1

1

I found the mistake. I was putting:

if (req.method == "GET" && req.method == "HEAD") {
            return (pass);
    }

In place of:

if (req.method == "GET" || req.method == "HEAD") {
            return (pass);
    }

Thank you.

Little crazy
  • 113
  • 2
  • 7