Is it possible to take cache decision from response header

Hugues Alary hugues.alary at gmail.com
Fri Feb 24 09:37:35 CET 2012


Yes.

In your vcl_fetch:

vcl_fetch {

if(beresp.http.X-DoNotCache)
{
   set beresp.ttl = 0;
}

}

On Fri, Feb 24, 2012 at 12:32 AM, Jewel Nuruddin <
jewel.nuruddin at eastbeam.co.jp> wrote:

> Hi all,
>
> I set a response header in my application(VARNISH-CACHE), so I want
> varnish to cache only those which  have that response header.
> Is it possible by varnish ?
> Please help me.
>
> Thanks
> Jewel
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>



-- 
Hugues ALARY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20120224/9d829be2/attachment.html>


More information about the varnish-misc mailing list