Caching based on response header
Matthew Wilkes
matthew at matthewwilkes.co.uk
Thu Sep 15 16:51:27 CEST 2011
On 2011-09-15, at 1520, Barak Yaish wrote:
> I meant exactly that, doesn't the answer of Kristian Lyngstol address this logic?
You just want to pass if there isn't that header in the beresp. You'll then get a HitPass object cached, so it will retry all requests to that URL for the next few minutes, after which if the header is set it will be cached.
That said, you should probably be using more sensible error codes, like 503 or 404 and only returning a 200 OK when the content is available.
Matt
More information about the varnish-misc
mailing list