influencing beresp.cacheable on the backend

Laurence Rowe l at lrowe.co.uk
Tue Apr 13 01:49:37 CEST 2010


On 12 April 2010 22:50, David Birdsong <david.birdsong at gmail.com> wrote:
> How can I influence bereps.cacheable in a backend such that it will
> evaluate to False?

beresp.cacheable is not re-evaluated. Decide whether to cache an
object or not by either returning pass or deliver, as is done by the
default VCL:

sub vcl_fetch {
    if (!beresp.cacheable) {
        return (pass);
    }
    if (beresp.http.Set-Cookie) {
        return (pass);
    }
    return (deliver);
}

Laurence




More information about the varnish-misc mailing list