MGET

Syntax
MGET key [key ...]
Available since:
1.0.0
Time complexity:
O(N) where N is the number of keys to retrieve.
ACL categories:
@read, @string, @fast,

返回所有指定键的值。 对于每个不持有字符串值或不存在的键,将返回特殊值nil。 因此,此操作永远不会失败。

示例

SET key1 "Hello" SET key2 "World" MGET key1 key2 nonexisting

RESP2/RESP3 回复

Array reply: a list of values at the specified keys.
RATE THIS PAGE
Back to top ↑