Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Varnish: Misc
varnish serve old object during refresh
 

Index | Next | Previous | View Flat


j.vanarragon at lukkien

Jan 30, 2012, 6:23 AM


Views: 741
Permalink
varnish serve old object during refresh

Hello,

How can I serve an old object during the fetch of an expired object or max
out connection?

Iıve configured the grace period in both the vcl_recv as the vcl_fetch.

I even tried to use the saint mode to give me back an ³old² cached object.

Can somebody give me help in this matter?

sub vcl_recv {

# Purge through http
if (req.request == "PURGE") {
if (!client.ip ~ purge) {
error 405 "Not allowed.";
}
ban("req.url ~ " + req.url );
error 200 "Purged.";
}

# Unset all cookies available
if (req.http.cookie) {
unset req.http.cookie;
}

if (req.request != "GET" && req.request != "HEAD") {
/* We only deal with GET and HEAD by default */
return (pass);
}

# Adding Grace period in case backend lags
set req.grace = 3d;
return (lookup);
}
....
sub vcl_fetch {
set beresp.grace = 4d;
set beresp.saintmode = 50s;
set beresp.ttl = 30s;
return (deliver);
}

Subject User Time
varnish serve old object during refresh j.vanarragon at lukkien Jan 30, 2012, 6:23 AM
    Re: varnish serve old object during refresh j.vanarragon at lukkien Feb 6, 2012, 11:48 PM
        Re: varnish serve old object during refresh straightflush at gmail Feb 7, 2012, 5:27 AM
    Re: varnish serve old object during refresh j.vanarragon at lukkien Feb 7, 2012, 11:20 PM
        Re: varnish serve old object during refresh perbu at varnish-software Feb 8, 2012, 12:31 AM
    Re: varnish serve old object during refresh steve.webster at lovefilm Feb 8, 2012, 1:59 AM

  Index | Next | Previous | View Flat
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.