GETDEL

Since 1.1.0Strings

Syntax

GETDEL key
  • Flags: fast, write
  • ACL categories: @fast, @string, @write
  • Arity: 2

Returns the string at key and deletes the key, in one step.

Reply

  • The value, or nil if the key did not exist.
  • A WRONGTYPE error, and nothing deleted, if the key is not a string.

Examples

> SET a v
OK
> GETDEL a
"v"
> GET a
(nil)