Suggestion: HDECR/HDECRBY

164 views
Skip to first unread message

Casey

unread,
Dec 1, 2010, 7:27:45 AM12/1/10
to Redis DB
HDECR/HDECRBY

purpose: atomic increment of a hash field

synposis:

HINCR key field

HINCRBY key field delta

Decrement commands in hashes are very useful on show/click counters
with per-hour or per-day limitations.

Dvir Volk

unread,
Dec 1, 2010, 7:30:59 AM12/1/10
to redi...@googlegroups.com
why not HINCRBY -1?


--
You received this message because you are subscribed to the Google Groups "Redis DB" group.
To post to this group, send email to redi...@googlegroups.com.
To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.


Salvatore Sanfilippo

unread,
Dec 1, 2010, 7:31:13 AM12/1/10
to redi...@googlegroups.com
HINCRBY hash field -100

> --
> You received this message because you are subscribed to the Google Groups "Redis DB" group.
> To post to this group, send email to redi...@googlegroups.com.
> To unsubscribe from this group, send email to redis-db+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/redis-db?hl=en.
>
>

--
Salvatore 'antirez' Sanfilippo
http://invece.org

"We are what we repeatedly do. Excellence, therefore, is not an act,
but a habit." -- Aristotele

Reply all
Reply to author
Forward
0 new messages