MGET (original) (raw)

  1. Docs Docs
  2. Commands
  3. MGET

Syntax text Syntax diagram

Available since:

Redis Open Source 1.0.0

Time complexity:

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

ACL categories:

@read, @string, @fast,

Compatibility:

Redis Enterprise and Redis Cloud compatibility

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.

Examples

SET key1 "Hello" SET key2 "World" MGET key1 key2 nonexisting

Redis Enterprise and Redis Cloud compatibility

RedisEnterprise RedisCloud Notes
✅ Standard✅ Active-Active ✅ Standard✅ Active-Active

Return information