Usage
Removes the specified fields from the hash stored atkey. Specified fields that do not exist within this hash are ignored.
Parameters
The key of the hash
One or more field names to delete from the hash
Response
Returns
1 if at least one field was removed, 0 if no fields were removed (either because they didn’t exist or the key doesn’t exist).Examples
Delete a single field
Delete multiple fields
Delete non-existent field
Delete from non-existent key
Remove sensitive data
Clean up cache fields
Notes
- If the key does not exist, it is treated as an empty hash and the command returns
0 - The return value indicates whether any field was removed, not the count of removed fields
- If all fields are removed, the key itself will be automatically deleted