Skip to content

Instantly share code, notes, and snippets.

@kevburnsjr
Created September 15, 2012 16:08
Show Gist options
  • Save kevburnsjr/3728614 to your computer and use it in GitHub Desktop.
Save kevburnsjr/3728614 to your computer and use it in GitHub Desktop.

Revisions

  1. kevburnsjr revised this gist Sep 15, 2012. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions lci.vcl
    Original file line number Diff line number Diff line change
    @@ -4,6 +4,6 @@ sub vcl_fetch {
    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""});
    ban("req.http.host == " + req.http.host + " && obj.http.link ~ <" + req.url + ">;.rel=.inv-by.");
    }
    }
    }
  2. kevburnsjr created this gist Sep 15, 2012.
    9 changes: 9 additions & 0 deletions lci.vcl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    # 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""});
    }
    }