MGET

Syntax

  1. MGET key [key ...]

Time complexity: 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.

Return

Array reply: list of values at the specified keys.

Examples

  1. dragonfly> SET key1 "Hello"
  2. "OK"
  3. dragonfly> SET key2 "World"
  4. "OK"
  5. dragonfly> MGET key1 key2 nonexisting
  6. 1) "Hello"
  7. 2) "World"
  8. 3) (nil)