For example, when I check the list, I must to use lrange. I just look at the content. Outside, I don’t know what type it is! ! ! I don’t know if I should use get or lrange!!!
Comment From: sundb
I'm not sure I fully understand what you mean.
Are you trying to know the encoding of the key?
~~You can use object encoding key to get the encoding of the key.~~
Btw. GET is a string object command, it is not realistic to have it support all keys.
Comment From: itamarhaber
Hello @lkerzanml
Thanks for making the suggestion, but I honestly can't see how it can work. Every type in Redis has its own set of commands for reading and writing. A generic GET for all types is not easily defined in terms of behavior, so it's usability is in question.
Please note that you can use the TYPE to obtain a key's data type.
Comment From: sundb
@lkerzanml Sorry to have misled you(object encoding is wrong). @itamarhaber is right.
Comment From: itamarhaber
Also, there's #6720 which is very similar and suggests this is a cli utility rather than a real command.