Skip to content

Instantly share code, notes, and snippets.

@kevburnsjr
Created September 15, 2012 16:08
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevburnsjr/3728614 to your computer and use it in GitHub Desktop.
Save kevburnsjr/3728614 to your computer and use it in GitHub Desktop.
LCI in Varnish
# LCI
sub vcl_fetch {
# For successful unsafe responses
if (beresp.status >= 200 && beresp.status < 400
&& (req.request == "PUT" || req.request == "POST" || req.request == "DELETE")) {
# Purge all the resources marked for cascading purge
ban("req.http.host == " + req.http.host + " && obj.http.link ~ <" + req.url + ">;.rel=.inv-by.");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment