influencing beresp.cacheable on the backend

David Birdsong david.birdsong at gmail.com
Tue Apr 13 01:58:20 CEST 2010


On Mon, Apr 12, 2010 at 4:49 PM, Laurence Rowe <l at lrowe.co.uk> wrote:
> 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:
>
Ok, but what I'm trying to figure out is what does it take in a
backend response for beresp.cacheable to be False.  The backend set
'Cache-Control: no-cache' and 'Expires: <epoch>', shouldn't that
response be uncacheable?  I'm finding that that response is cached.

> 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