redis.zero {rediscc} | R Documentation |
redis.zero
resets a counter to zero
redis.inc
increments a counter
redis.dec
decrements a counter
redis.zero(rc, key)
redis.inc(rc, key)
redis.dec(rc, key, N0 = FALSE)
rc |
Redis connection as returned by |
key |
key associated with the counter |
N0 |
logical, if |
Counters are implemented directly in Redis and therefore do no
behave like any other values set via redis.set
since they are
not serialized R objects. This is also why they have to be reset
using redis.zero
and cannot be set using
redis.set
.
Note that redis.dec
with N0=TRUE
is currently
implemented such that the counter is first decremented and only if it
leads to a negative value it is reset to zero.
integer, resulting counter value
Simon Urbanek