[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-misc
Subject: Re: No-cache but still a HIT
From: Aanchal Gera <aanchal.gera () gmail ! com>
Date: 2012-10-09 7:14:03
Message-ID: CAFf4ghb4w9aLC9_fYV7fh22LeTa6H21NpcM8OtP-drZ+NBFFvg () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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) <
hugo.cisneiros@gmail.com> wrote:
> On Mon, Oct 8, 2012 at 5:45 AM, Aanchal Gera <aanchal.gera@gmail.com>
> 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
> varnish-misc@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
[Attachment #5 (text/html)]
<font color="#006600"><font face="tahoma,sans-serif">I am sorry, but I am very \
confused here. no-cache is an attribute of response. Why should I check it in \
req?</font></font><div><font color="#006600"><font face="tahoma,sans-serif"><br> \
</font></font></div><div><font color="#006600"><font face="tahoma,sans-serif">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.</font></font></div> <div><font \
color="#006600"><font face="tahoma,sans-serif"><br></font></font></div><div><font \
color="#006600"><font face="tahoma,sans-serif">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.<br> </font></font><br><div class="gmail_quote">On Tue, Oct 9, 2012 at 4:58 \
AM, Hugo Cisneiros (Eitch) <span dir="ltr"><<a \
href="mailto:hugo.cisneiros@gmail.com" \
target="_blank">hugo.cisneiros@gmail.com</a>></span> wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div class="im">On Mon, Oct 8, 2012 at 5:45 AM, Aanchal Gera \
<<a href="mailto:aanchal.gera@gmail.com">aanchal.gera@gmail.com</a>> wrote:<br>
> Ohh, Is it!!!<br>
><br>
> So, what would be the best way to tell Varnish that I don't want to cache \
an<br> > ESI fragment?<br>
<br>
</div>In your case, something like this on vcl_recv:<br>
<br>
if (req.http.cache-control ~ "no") { return (pass); }<br>
<br>
If you have other pages that returns the http header cache-control:<br>
no, you have to be more specific at the if statement (req.url or<br>
something like that).<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
[]'s<br>
Hugo<br>
<a href="http://www.devin.com.br" target="_blank">www.devin.com.br</a><br>
</font></span><div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
varnish-misc mailing list<br>
<a href="mailto:varnish-misc@varnish-cache.org">varnish-misc@varnish-cache.org</a><br>
<a href="https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc" \
target="_blank">https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc</a><br>
</div></div></blockquote></div><br></div>
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic