GET

Since 1.1.0Strings

Syntax

GET key
  • Flags: fast, readonly
  • ACL categories: @fast, @read, @string
  • Arity: 2

Returns the string stored at key.

Reply

  • The value, as a bulk string.
  • nil if the key does not exist.
  • A WRONGTYPE error if the key holds a list, hash or other non-string value.

Examples

> SET greeting hello
OK
> GET greeting
"hello"
> GET missing
(nil)