MGET key [key …]
相关命令
- APPEND
- BITCOUNT
- BITOP
- BITPOS
- DECR
- DECRBY
- GET
- GETBIT
- GETRANGE
- GETSET
- INCR
- INCRBY
- INCRBYFLOAT
- MGET
- MSET
- MSETNX
- PSETEX
- SET
- SETBIT
- SETEX
- SETNX
- SETRANGE
- STRLEN
始于1.0.0可用。
时间复杂度: O(N) where N is the number of keys to retrieve.
Returns the values of all specified keys. For every key that does not hold a string value or does not exist, the special value nil
is returned. Because of this, the operation never fails.
返回值
Array reply: list of values at the specified keys.
例子
redis> SET key1 "Hello"
- OK
redis> SET key2 "World"
- OK
redis> MGET key1 key2 nonexisting
- 1) "Hello"
- 2) "World"
- 3) (nil)
This website is open source software developed by Citrusbyte.
The Redis logo was designed by Carlos Prioglio. See more credits.