Force caching with return(pass)

Nicolas Delmas colas.delmas at gmail.com
Fri Nov 20 13:22:21 CET 2015


So I need to move all my rules from vcl_recv to vcl_backend_response ? If I
do this what could be the consequence ? Some error to cache ? performance ?

Thank you



*Nicolas Delmas*
colas.delmas at gmail.com

2015-11-20 9:43 GMT+01:00 Andreas Plesner <apj at mutt.dk>:

> On Fri, Nov 20, 2015 at 09:33:41AM +0100, Nicolas Delmas wrote:
> >
> > But some url, for exemple an image, has 301 redirect. I want to cache
> this
> > 301 even if I have a return(pass) in vcl_recv.
> > I want this 301 be cached for everyone because it's not necessary to send
> > request to the backend.
> > It's the same for 404.
> >
> > Is it possble ? and how to do it ?
>
> No. Don't pass in recv. For uncacheable items, set beresp.uncacheable and a
> positive ttl in backend_response instead.
>
> --
> Andreas
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20151120/c57bc3c8/attachment.html>


More information about the varnish-misc mailing list