From: des Date: Tue, 3 Jul 2007 14:17:28 +0000 (+0000) Subject: Add two VCL variables, "now" and "obj.lastuse". The former returns the X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a1975a85a7a59ff9807968052a79f20e1483c79;p=varnish Add two VCL variables, "now" and "obj.lastuse". The former returns the current time, the latter returns the number of seconds since an object was last requested. The exact semantics of both are slightly fluid at the moment, and will be revisited at a later date. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1628 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/lib/libvcl/vcc_gen_obj.tcl b/varnish-cache/lib/libvcl/vcc_gen_obj.tcl index 079e208e..396afb0d 100755 --- a/varnish-cache/lib/libvcl/vcc_gen_obj.tcl +++ b/varnish-cache/lib/libvcl/vcc_gen_obj.tcl @@ -130,6 +130,10 @@ set spobj { RW TIME { hit fetch discard timeout} } + { obj.lastuse + RO TIME + { hit fetch deliver discard timeout} + } # The response we send back { resp.proto @@ -148,6 +152,12 @@ set spobj { RW HEADER { fetch } } + + # Miscellaneous + { now + RO TIME + {recv pipe pass hash miss hit fetch deliver discard timeout} + } } set tt(IP) "struct sockaddr *"