GETDEL

Usage:
GETDEL key
Complexity:
O(1)
Since:
6.2.0

Get the value of key and delete the key. This command is similar to GET, except for the fact that it also deletes the key on success (if and only if the key’s value type is a string).

Examples

SET mykey "Hello"
GETDEL mykey
GET mykey