Created
September 15, 2012 16:08
-
-
Save kevburnsjr/3728614 to your computer and use it in GitHub Desktop.
LCI in Varnish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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