]> err.no Git - varnish/commitdiff
Add two VCL variables, "now" and "obj.lastuse". The former returns the
authordes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 3 Jul 2007 14:17:28 +0000 (14:17 +0000)
committerdes <des@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 3 Jul 2007 14:17:28 +0000 (14:17 +0000)
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

index 079e208e616758dc4b16c74086502c53aa5520c1..396afb0d068edb7b428c2175cd3876145f00779f 100755 (executable)
@@ -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 *"