Skip to content

Instantly share code, notes, and snippets.

@KristianLyng
Created February 20, 2013 17:52
Show Gist options
  • Select an option

  • Save KristianLyng/4997502 to your computer and use it in GitHub Desktop.

Select an option

Save KristianLyng/4997502 to your computer and use it in GitHub Desktop.
sub vcl_recv {
if (req.restarts == 0) {
set req.http.x-magic = "0";
}
if (req.http.x-magic == "1") {
set req.hash_always_miss = true;
}
}
sub vcl_deliver {
if (resp.http.content-length == "0" && req.http.x-magic == "0") {
set req.http.x-magic = 1;
return (restart);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment