Redis Mget command
The Redis Mget command returns the values of all (one or more) given keys. If a given key does not exist, that key returns the special value nil.
Syntax
The basic syntax of the redis Mget command is as follows:
redis 127.0.0.1:6379> MGET KEY1 KEY2 .. KEYN
Available Version
= 1.0.0
Return Value
A list containing the values of all given keys.
Example
redis 127.0.0.1:6379> SET key1 "hello"
OK
redis 127.0.0.1:6379> SET key2 "world"
OK
redis 127.0.0.1:6379> MGET key1 key2 someOtherKey
1) "Hello"
2) "World"
3) (nil)
Redis string