Skip to main content



MGET key [key ...]

Time complexity: O(N) where N is the number of keys to retrieve.

ACL categories: @read, @string, @fast

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.


dragonfly> SET key1 "Hello"
dragonfly> SET key2 "World"
dragonfly> MGET key1 key2 nonexisting
1) "Hello"
2) "World"
3) (nil)