Q7 Redis Domain 2 · 25–30% of exam

Which Redis command is used to check if a specific key exists and retrieve its value in a single round trip?

  1. A EXISTS + GET (two commands)
  2. B GET (returns nil if missing) (correct answer)
  3. C GETEX
  4. D MGET

Shortcut: GET returns the value if the key exists, or nil if it doesn't. This replaces the pattern of EXISTS + GET (two round trips) in a single command.