Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
Closed
Description
The Varnish documentation in the cookbook isn't 100% correct. In order to purge you need to make sure thePURGE method is dealt with invcl_recv, otherwise Varnish is going to fallback on default behaviour.
This means Varnish will consider it a non-RFC-compliant method, willpipe the request to the backend and ignore the Varnish caching mechanisms.
To avoid that simply catchPURGE requests and immediately perform a lookup to the cache. By doing this you'll skip default behaviour.
It's just a matter of adding the following piece of VCL
sub vcl_recv { if (req.request == "PURGE") { return(lookup); }}A full example of an acl would also be interesting.
I'm going to create a pull request and link to this issue as a reference.