I am sorry, but I am very confused here. no-cache is an attribute of response. Why should I check it in req?
Anyway, this should not be so complicated. My simple requirement is that I don't want varnish to cache my esi URL. Why can't I simply set something in the response headers which tells varnish not to store it in cache. I can write specific statements in varnish for that particular url, but I don't want to do that as there will be more such urls with time. This logic should be handled in my code, not in varnish. On Tue, Oct 9, 2012 at 4:58 AM, Hugo Cisneiros (Eitch) < [email protected]> wrote: > On Mon, Oct 8, 2012 at 5:45 AM, Aanchal Gera <[email protected]> > wrote: > > Ohh, Is it!!! > > > > So, what would be the best way to tell Varnish that I don't want to > cache an > > ESI fragment? > > In your case, something like this on vcl_recv: > > if (req.http.cache-control ~ "no") { return (pass); } > > If you have other pages that returns the http header cache-control: > no, you have to be more specific at the if statement (req.url or > something like that). > > -- > []'s > Hugo > www.devin.com.br > > _______________________________________________ > varnish-misc mailing list > [email protected] > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc >
_______________________________________________ varnish-misc mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
