vcl_miss and purge question

Rangel, Raul Raul.Rangel at disney.com
Fri Mar 15 15:13:10 CET 2013


You need it in the vcl_miss because you need to clear our Very objects as well.

Raul

From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Sean Allen
Sent: Friday, March 15, 2013 8:12 AM
To: varnish-misc at varnish-cache.org
Subject: vcl_miss and purge question

Using varnish 3. Our configuration works but when I was putting it together, I was learning from docs and blog posts. I have:

sub vcl_hit {
  # 'manual' purge
  if (req.request == "PURGE") {
    purge;
    error 200 "Purged.";
  }
}

sub vcl_miss {
  # 'manual' purge
  if (req.request == "PURGE") {
    purge;
    error 404 "Not in cache.";
  }
}

Does the purge in vcl_miss need to be there?
Could it just be:

sub vcl_miss {
  # 'manual' purge
  if (req.request == "PURGE") {
    error 404 "Not in cache.";
  }
}

?

Thanks,
Sean

--

Ce n'est pas une signature
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20130315/21967a0c/attachment.html>


More information about the varnish-misc mailing list