r1628 - trunk/varnish-cache/lib/libvcl

des at projects.linpro.no des at projects.linpro.no
Tue Jul 3 16:17:29 CEST 2007


Author: des
Date: 2007-07-03 16:17:28 +0200 (Tue, 03 Jul 2007)
New Revision: 1628

Modified:
   trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
Log:
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.


Modified: trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl
===================================================================
--- trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2007-07-03 12:22:42 UTC (rev 1627)
+++ trunk/varnish-cache/lib/libvcl/vcc_gen_obj.tcl	2007-07-03 14:17:28 UTC (rev 1628)
@@ -130,6 +130,10 @@
 		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 @@
 		RW HEADER
 		{                             fetch                        }
 	}
+
+	# Miscellaneous
+	{ now
+		RO TIME
+		{recv pipe pass hash miss hit fetch deliver discard timeout}
+	}
 }
 
 set tt(IP)	"struct sockaddr *"




More information about the varnish-commit mailing list