Hash
HPERSIST
Remove the expiration from one or more hash fields.
Arguments
keybodystrrequired
The key of the hash.
fieldsbodyUnion[str, List[str]]required
The field or list of fields within the hash to remove the expiry from.
Response
List[int]required
A list of integers indicating the result for each field:
-2if the field does not exist in the hash or if the key doesn't exist.-1if the field exists but has no associated expiration set.1if the expiration was successfully removed.
For more details, see HPERSIST documentation.
Example
redis.hset(hash_name, field, value)redis.hpexpire(hash_name, field, 1000)assert redis.hpersist(hash_name, field) == [1]