Actually, I need to set clientcache in fetch. But seems varnish can not add this attribute into cache list. <br><br><div class="gmail_quote">On Mon, Mar 7, 2011 at 11:41 PM, Poul-Henning Kamp <span dir="ltr"><<a href="mailto:phk@phk.freebsd.dk">phk@phk.freebsd.dk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">In message <<a href="mailto:AANLkTimcr8HX5aP4nsDDDPDzMqqrE-774tA2Y4svkeJw@mail.gmail.com">AANLkTimcr8HX5aP4nsDDDPDzMqqrE-774tA2Y4svkeJw@mail.gmail.com</a>>, Junx<br>
<div class="im">ian Yan writes:<br>
<br>
>Here is my code:<br>
>in vcl_fetch<br>
> if (req.url ~ "/(images|javascripts|stylesheets)/") {<br>
> unset beresp.http.Set-Cookie;<br>
> set beresp.http.Cache-Control = "private, max-age = 3600,<br>
>must-revalidate"; # 1 hour<br>
> set beresp.ttl = 10m;<br>
> set beresp.http.clientcache = "1";<br>
> return(deliver);<br>
> }<br>
><br>
>And I also wanna the response of the second request have the max-age = 3600<br>
>and clientcache = 1. The actual result is max-age = 0 and no clientcache in<br>
>response<br>
<br>
</div>Wouldn't it be easier to set the Cache-Control in vcl_deliver then ?<br>
<font color="#888888"><br>
--<br>
Poul-Henning Kamp | UNIX since Zilog Zeus 3.20<br>
phk@FreeBSD.ORG | TCP/IP since RFC 956<br>
FreeBSD committer | BSD since 4.3-tahoe<br>
Never attribute to malice what can adequately be explained by incompetence.<br>
</font></blockquote></div><br>