From b412c544fd6d5efd1e3986383ef6bef7775fe48f Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 27 Nov 2017 13:16:07 +0100 Subject: [PATCH 1/2] Fix entry command table entry for OBJECT for HELP option. After #4472 the command may have just 2 arguments. --- src/server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server.c b/src/server.c index 88892626..6bc8bc66 100644 --- a/src/server.c +++ b/src/server.c @@ -276,7 +276,7 @@ struct redisCommand redisCommandTable[] = { {"readonly",readonlyCommand,1,"F",0,NULL,0,0,0,0,0}, {"readwrite",readwriteCommand,1,"F",0,NULL,0,0,0,0,0}, {"dump",dumpCommand,2,"r",0,NULL,1,1,1,0,0}, - {"object",objectCommand,3,"r",0,NULL,2,2,2,0,0}, + {"object",objectCommand,-2,"r",0,NULL,2,2,2,0,0}, {"memory",memoryCommand,-2,"r",0,NULL,0,0,0,0,0}, {"client",clientCommand,-2,"as",0,NULL,0,0,0,0,0}, {"eval",evalCommand,-3,"s",0,evalGetKeys,0,0,0,0,0}, From 75fa7879e6b4408247db6b7eba3def64c00d4f9a Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 27 Nov 2017 18:09:05 +0100 Subject: [PATCH 2/2] Improve OBJECT HELP descriptions. See #4472. --- src/object.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/object.c b/src/object.c index e62b5b3d..8c33d7ef 100644 --- a/src/object.c +++ b/src/object.c @@ -1026,9 +1026,9 @@ void objectCommand(client *c) { blen++; addReplyStatus(c, "encoding -- Return the kind of internal representation used in order to store the value associated with a key."); blen++; addReplyStatus(c, - "idletime -- Return the number of seconds since the object stored at the specified key is idle."); + "idletime -- Return the idle time of the key, that is the approximated number of seconds elapsed since the last access to the key."); blen++; addReplyStatus(c, - "freq -- Return the inverse logarithmic access frequency counter of the object stored at the specified key."); + "freq -- Return the access frequency index of the key. The returned integer is proportional to the logarithm of the recent access frequency of the key."); setDeferredMultiBulkLength(c,blenp,blen); } else if (!strcasecmp(c->argv[1]->ptr,"refcount") && c->argc == 3) { if ((o = objectCommandLookupOrReply(c,c->argv[2],shared.nullbulk))