send reason along with backend request

AD straightflush at gmail.com
Mon Dec 12 02:47:51 CET 2011


you should be able to add a req.http.header in your vcl_fetch.  I dont
believe vcl_fetch gets called unless you are in a cache_miss and you need
to contact the backend.

sub vcl_fetch {

 req.http.X-Custom-Header = "test";
}

Not sure varnish exposes the miss "reason" though, aside from the fact that
it is either not cacheable or it is and just isn't in the cache.



On Sun, Dec 11, 2011 at 1:59 PM, Arjen Schat <arjen at thenextweb.com> wrote:

> HI All,
>
> Is there a way to send an extra header to the backend request if a miss
> occurs?
> There are 4 scenario's I can think off: purged, old, not set and lru. This
> would make debugging and stats a lot easier.
>
>
> Thanks,
> Arjen
>
>
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20111211/242d330f/attachment-0003.html>


More information about the varnish-misc mailing list