Skip to content
This repository has been archived by the owner on May 14, 2024. It is now read-only.
Josh Baker edited this page Oct 10, 2016 · 7 revisions

MGET key [key ...]

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.

Return value

Array reply: list of values at the specified keys.

Examples

redis> SET key1 "Hello"
OK
redis> SET key2 "World"
OK
redis> MGET key1 key2 nonexisting
1) "Hello"
2) "World"
3) (nil)
Clone this wiki locally