client
UK[ˈklaɪənt] US[ˈklaɪənt]
n.Customer;Party;Litigation client;[Computer]Client
Plural: clients
##get
UK[get] 美[ɡɛt] vt. Get; catch; persuade; receive (punishment, etc.) ) vt.& vi. Arrive, come vi. Become; start; try to deal with; obtain benefits or wealth n. Reproduce, cub; profit Third person singular: gets Present participle: getting Past tense: got Past participle: got gottenname
英[neɪm] 美[nem] n. Name; reputation; named; famous person vt. Determine; decide; name…; name… adj. Famous of; based on which to name Third person singular: names Plural: names Present participle: naming Past tense: named Past participle: namedredis CLIENT GETNAME command syntax
Function:Return the name set by the CLIENT SETNAME command for the connection.
Syntax:CLIENT GETNAME
Instructions:Because newly created connections have no name by default, CLIENT GETNAME returns Blank reply.
Available versions:>= 2.6.9
Time complexity:O(1)
Return:If the connection does not have a name set, then a blank reply is returned; if a name is set, then the name is returned.
redis CLIENT GETNAME command example
# 新连接默认没有名字 redis 127.0.0.1:6379> CLIENT GETNAME (nil) # 设置名字 redis 127.0.0.1:6379> CLIENT SETNAME hello-world-connection OK # 返回名字 redis 127.0.0.1:6379> CLIENT GETNAME "hello-world-connection"