|
Hi, Is it possible to set obj.ttl to the value getting from a backend response header. My application is calculating the TTL value and setting a header "upstream-ttl". I'm using below syntax in vcl_fetch but it's not working. 13 ObjStatus c 200 13 ObjResponse c OK 13 ObjHeader c Date: Mon, 22 Mar 2010 10:36:16 GMT 13 ObjHeader c Server: Apache/2.2.9 (Unix) PHP/5.2.5 13 ObjHeader c X-Powered-By: PHP/5.2.5 13 ObjHeader c upstream-ttl: 5867221s 13 ObjHeader c Content-Type: text/xml;charset=UTF-8 vcl_fetch { if (req.http.host ~ "^xx.example.com") { if (req.url ~ "^/index*") { set obj.http.Cache-Control = "max-age=604800"; set obj.ttl = 7d; } else { set obj.ttl = beresp.http.upstream-ttl; } deliver; } } Regards, Mahesh. |
_______________________________________________ varnish-misc mailing list [email protected] http://lists.varnish-cache.org/mailman/listinfo/varnish-misc
