set

英[set] 美[sɛt]

vt. Set; place, arrange; put in a certain situation; place tableware

vi. Setting off; setting off; condensation

n.Gathering; a set; a set; a TV set

adj. Fixed; located in...; stubborn; arranged The

third person singular: sets plural: sets present participle: setting past tense: set past participle: set

redis HSET command syntax

Function: Set the value of the field field in the hash table key to value.

Syntax: HSET key field value

Description: If key does not exist, a new hash table is created and the HSET operation is performed. If the field field already exists in the hash table, the old value will be overwritten.

Available versions: >= 2.0.0

Time complexity: O(1)

Return: If field is a new field in the hash table and the value is set successfully, return 1. If the field field in the hash table already exists and the old value has been overwritten by the new value, 0 is returned.

redis HSET command example

redis> HSET website google "www.g.cn"       # 设置一个新域
(integer) 1
redis> HSET website google "www.google.com" # 覆盖一个旧域
(integer) 0