The VCL looks right at first glance. Are you sure the object is actually being cached in the first place? You can confirm with something like this in your vcl_deliver<div><br></div><div><div>if (obj.hits > 0) {</div><div>
set resp.http.X-Cache = "HIT";</div><div> } else {</div><div> set resp.http.X-Cache = "MISS";</div><div> }</div><br><div class="gmail_quote">On Tue, Feb 7, 2012 at 2:48 AM, Jaap van Arragon <span dir="ltr"><<a href="mailto:j.vanarragon@lukkien.com">j.vanarragon@lukkien.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>
<font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt">Hello,<br>
<br>
Sorry for “kicking” my question but I really need help with this.<br>
<br>
How can I configure varnish 3 so that it will serve cached objects to the client while the new objects are being fetched from the backed?<br>
<br>
Hope to hear something.<br>
<br>
Thank you.<br>
<br>
Regards,<br>
Jaap van Arragon<div><div></div><div class="h5"><br>
<br>
<br>
On 1/30/12 3:23 PM, "Jaap van Arragon" <<a href="http://j.vanarragon@lukkien.com" target="_blank">j.vanarragon@lukkien.com</a>> wrote:<br>
<br>
</div></div></span></font><blockquote><font face="Calibri, Verdana, Helvetica, Arial"><span style="font-size:11pt"><div><div></div><div class="h5">Hello,<br>
<br>
How can I serve an old object during the fetch of an expired object or max out connection?<br>
<br>
I’ve configured the grace period in both the vcl_recv as the vcl_fetch.<br>
<br>
I even tried to use the saint mode to give me back an “old” cached object.<br>
<br>
Can somebody give me help in this matter?<br>
<br>
sub vcl_recv {<br>
<br>
# Purge through http<br>
if (req.request == "PURGE") {<br>
if (!client.ip ~ purge) {<br>
error 405 "Not allowed.";<br>
}<br>
ban("req.url ~ " + req.url );<br>
error 200 "Purged.";<br>
}<br>
<br>
# Unset all cookies available<br>
if (req.http.cookie) {<br>
unset req.http.cookie;<br>
}<br>
<br>
if (req.request != "GET" && req.request != "HEAD") {<br>
/* We only deal with GET and HEAD by default */<br>
return (pass);<br>
}<br>
<br>
# Adding Grace period in case backend lags<br>
set req.grace = 3d;<br>
return (lookup);<br>
}<br>
....<br>
sub vcl_fetch {<br>
set beresp.grace = 4d;<br>
set beresp.saintmode = 50s;<br>
set beresp.ttl = 30s;<br>
return (deliver);<br>
}<br>
<br>
<br>
</div></div><hr align="CENTER" size="3" width="95%"></span></font><font><font face="Consolas, Courier New, Courier"><span style="font-size:10pt">_______________________________________________<br>
varnish-misc mailing list<br>
<a href="http://varnish-misc@varnish-cache.org" target="_blank">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>
</span></font></font></blockquote>
</div>
<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></blockquote></div><br></div>