From 0a1975a85a7a59ff9807968052a79f20e1483c79 Mon Sep 17 00:00:00 2001 From: des Date: Tue, 3 Jul 2007 14:17:28 +0000 Subject: [PATCH] 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 --- varnish-cache/lib/libvcl/vcc_gen_obj.tcl | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 *" -- 2.39.5