Skip to content

Instantly share code, notes, and snippets.

@hamsolodev
Created March 18, 2010 08:41
Show Gist options
  • Save hamsolodev/336171 to your computer and use it in GitHub Desktop.
Save hamsolodev/336171 to your computer and use it in GitHub Desktop.
Helps a bit with verifying things are being cached properly and retrieved from cache by requests.
sub vcl_deliver {
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";
}
deliver;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment