Commit 83319e42 authored by Tollef Fog Heen's avatar Tollef Fog Heen Committed by Tollef Fog Heen

Remove obj.last_use

parent 243e6909
......@@ -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);
}
......
......@@ -610,7 +610,6 @@ struct object {
/* VCL only variables */
long hits;
double last_use;
double last_modified;
......
......@@ -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
......
......@@ -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)
......
......@@ -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++;
......
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
......
......@@ -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', ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment