GETDEL

GETDEL key
Available since:
Redis Open Source 6.2.0
Time complexity:
O(1)
ACL categories:
@write, @string, @fast,
Compatibility:
Redis Software and Redis Cloud compatibility

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

Redis Software and Redis Cloud compatibility

Redis
Software
Redis
Cloud
Notes
✅ Standard
✅ Active-Active
✅ Standard
✅ Active-Active

Return information

One of the following:

RATE THIS PAGE
Back to top ↑