Description Usage Arguments Details Value Author(s)
redis.zero resets a counter to zero
redis.inc increments a counter
redis.dec decrements a counter
1 2 3 | 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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.