[master] 83319e4 Remove obj.last_use

Tollef Fog Heen tfheen at err.no
Wed Mar 19 06:42:39 CET 2014


commit 83319e42e9e5a274679a6aa578635b1335407658
Author: Tollef Fog Heen <tfheen at fastly.com>
Date:   Tue Mar 18 17:25:10 2014 +0100

    Remove obj.last_use

diff --git a/bin/varnishd/builtin.vcl b/bin/varnishd/builtin.vcl
index 5ac9664..92f4641 100644
--- a/bin/varnishd/builtin.vcl
+++ b/bin/varnishd/builtin.vcl
@@ -118,7 +118,6 @@ sub vcl_deliver {
      * Enable them only if you need them.
      *
      * set obj.hits = obj.hits + 1;
-     * set obj.last_use = now;
      */
     return (deliver);
 }
diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index eac7546..ce90e58 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -610,7 +610,6 @@ struct object {
 
 	/* VCL only variables */
 	long			hits;
-	double			last_use;
 
 	double			last_modified;
 
diff --git a/bin/varnishd/cache/cache_cli.c b/bin/varnishd/cache/cache_cli.c
index 55145cd..8aa022b 100644
--- a/bin/varnishd/cache/cache_cli.c
+++ b/bin/varnishd/cache/cache_cli.c
@@ -200,7 +200,6 @@ cli_debug_sizeof(struct cli *cli, const char * const *av, void *priv)
 	OFOF(struct object, http);
 	OFOF(struct object, store);
 	OFOF(struct object, esidata);
-	OFOF(struct object, last_use);
 #endif
 #undef OFOF
 #endif
diff --git a/bin/varnishd/cache/cache_vrt_var.c b/bin/varnishd/cache/cache_vrt_var.c
index 8a999c9..0bcd5d5 100644
--- a/bin/varnishd/cache/cache_vrt_var.c
+++ b/bin/varnishd/cache/cache_vrt_var.c
@@ -592,8 +592,6 @@ VRT_r_obj_##field(const struct vrt_ctx *ctx)				\
 
 VOBJ_L(long, hits)
 VOBJ_R(long, hits)
-VOBJ_L(double, last_use)
-VOBJ_R(double, last_use)
 
 unsigned
 VRT_r_obj_uncacheable(const struct vrt_ctx *ctx)
diff --git a/bin/varnishd/storage/stevedore.c b/bin/varnishd/storage/stevedore.c
index c2788a9..30ae453 100644
--- a/bin/varnishd/storage/stevedore.c
+++ b/bin/varnishd/storage/stevedore.c
@@ -286,7 +286,6 @@ STV_MkObject(struct stevedore *stv, struct busyobj *bo,
 	HTTP_Setup(o->http, bo->ws_o, bo->vsl, SLT_ObjMethod);
 	o->http->magic = HTTP_MAGIC;
 	o->exp = bo->exp;
-	o->last_use = bo->t_fetch;
 	VTAILQ_INIT(&o->store);
 	bo->stats->n_object++;
 
diff --git a/bin/varnishtest/tests/v00013.vtc b/bin/varnishtest/tests/v00013.vtc
index fa3afda..0bb2858 100644
--- a/bin/varnishtest/tests/v00013.vtc
+++ b/bin/varnishtest/tests/v00013.vtc
@@ -1,4 +1,4 @@
-varnishtest "Check obj.hits and obj.last_use"
+varnishtest "Check obj.hits"
 
 server s1 {
 	rxreq
@@ -13,9 +13,7 @@ varnish v1 -vcl+backend {
 
 	sub vcl_deliver {
 		set resp.http.foo = obj.hits;
-		set resp.http.bar = now - obj.last_use;
 		set obj.hits = obj.hits + 1;
-		set obj.last_use = now;
 	}
 } -start
 
diff --git a/lib/libvcc/generate.py b/lib/libvcc/generate.py
index 7b9ab4e..9d8239b 100755
--- a/lib/libvcc/generate.py
+++ b/lib/libvcc/generate.py
@@ -546,15 +546,6 @@ sp_variables = [
 		( 'hit', ), """
 		"""
 	),
-	('obj.last_use',
-		'TIME',
-		( 'hit', 'deliver',),
-		( 'hit', 'deliver',), """
-		The approximate time elapsed since the object was
-		last requests, in seconds. This variable is also
-		available in vcl_deliver.
-		"""
-	),
 	('obj.uncacheable',
 		'BOOL',
 		( 'hit', ),



More information about the varnish-commit mailing list