mget.3valkey - Man Page
Atomically returns the string values of one or more keys.
Synopsis
MGET key [key...]
Description
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.
Reply
valkey-protocol(7) Array reply: a list of values at the specified keys.
Complexity
O(N) where N is the number of keys to retrieve.
Acl Categories
@fast @read @string
History
- Available since: 1.0.0
Examples
127.0.0.1:6379> SET key1 "Hello" OK 127.0.0.1:6379> SET key2 "World" OK 127.0.0.1:6379> MGET key1 key2 nonexisting 1) "Hello" 2) "World" 3) (nil)
See Also
append(3valkey), decr(3valkey), decrby(3valkey), delifeq(3valkey), get(3valkey), getdel(3valkey), getex(3valkey), getrange(3valkey), getset(3valkey), incr(3valkey), incrby(3valkey), incrbyfloat(3valkey), lcs(3valkey), mset(3valkey), msetnx(3valkey), psetex(3valkey), set(3valkey), setex(3valkey), setnx(3valkey), setrange(3valkey), strlen(3valkey), substr(3valkey)