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 gotten

name

英[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: named

redis 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

# 新連接默認(rèn)沒有名字
redis 127.0.0.1:6379> CLIENT GETNAME
(nil)
# 設(shè)置名字
redis 127.0.0.1:6379> CLIENT SETNAME hello-world-connection
OK
# 返回名字
redis 127.0.0.1:6379> CLIENT GETNAME
"hello-world-connection"