Question
HGETDEL versus HDEL: which preserves a retrieved hash-field value?
Answer
HGETDEL returns the selected field value while deleting it atomically; HDEL deletes without returning that value. Use HGETDEL for atomic consume-and-remove workflows; use HDEL for deletion alone. Applies to Redis and Valkey.