Module Hub Beta


key field value

Sets the field in Hash key to value and returns the previous value, if any

Return Value

Bulk string reply: the previous value or NULL if field didn’t exist.


redis> HINCRBY myhash counter 1
(integer) 1
redis> HGETSET myhash counter 5
(integer) 1
redis> HGET myhash counter
(integer) 5

© 2017 Redis Labs, Inc. All rights reserved.