Skip to content

Instantly share code, notes, and snippets.

@msonnabaum
Created April 15, 2011 19:05
Show Gist options
  • Save msonnabaum/922268 to your computer and use it in GitHub Desktop.
Save msonnabaum/922268 to your computer and use it in GitHub Desktop.
sub vcl_deliver {
# Add an X-Cache diagnostic header
if (obj.hits > 0) {
set resp.http.X-Cache = "HIT";
set resp.http.X-Cache-Hits = obj.hits;
} else {
set resp.http.X-Cache = "MISS";
}
return(deliver);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment