Upgrade v3 -> v4 beresp.url in vcl_backend_response

Andreas Plesner Jacobsen apj at mutt.dk
Tue May 6 15:43:21 CEST 2014


On Tue, May 06, 2014 at 03:37:14PM +0200, Giuseppe Pascarella wrote:
> Another small issue on v3 vs v4.
> In vcl_backend_response (ex. vcl_fetch) I used to override default
> ttl, as suggested in:
> 
> https://www.varnish-cache.org/docs/trunk/users-guide/increasing-your-hitrate.html
> 
> sub vcl_backend_response {
>     if (bereq.url ~ "^/legacy_broken_cms/") {
>         set beresp.ttl = 5d;
>     }
> }
> 
> Now bereq has no url attribute, how can I implement the same
> override functionality?

Yes it does, and the above works for me.

-- 
Andreas



More information about the varnish-misc mailing list