Created
May 11, 2018 14:45
-
-
Save section-io-gists/a93af63a9e2d350bdb6962a974eba5f5 to your computer and use it in GitHub Desktop.
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
# You must set a grace period on any object you put in cache for this to work. | |
sub vcl_hit { | |
if (obj.ttl >= 0s) { | |
return (deliver); | |
} | |
if (obj.ttl + obj.grace > 0s) { | |
return (deliver); | |
} | |
# This must return fetch if Varnish version 4/5. This is config for Varnish 6 | |
return (miss); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment