Description Usage Arguments Details Note Author(s) See Also
redis.get
retrieves values for given keys
redis.set
sets (stores/replaces) values for given keys
redis.rm
removes values for given keys
redis.keys
lists all keys matching a pattern
1 2 3 4 |
rc |
redis connection handle as returned by
|
keys |
character vector of keys. For |
list |
logical, if |
character |
logical, if |
values |
only used if |
as.is |
logical, if |
pattern |
string with a glob-style pattern as suppored by Redis
or |
redis.get
retrieves values associated with the speicifed
keys. If list
is FALSE
then keys
is expected to
be a single string and the value is returned directly. If
list
is TRUE
then a list is returned with one result
element for each key element. If a key doesn't exist NULL
is
returned for that key. If character
is TRUE
then
the result is a (named) character vector with as many entries as
there are keys. If any of the results are not strings, a warning
is issued and NA
value is returned for any such element.
redis.set
sets one or more key/value pairs. If keys
is
of length one then values
is interpreted directly as a single
value. If keys
is a character vector of length of more than
one, then values
must be a list of the same length. Finally,
keys
can be a named list in which case values
are
ignored and names of the list are taken as keys and elements as
values.
redis.rm
removes a key/value pair from the database. See the
note below for the difference of redis.rm
and setting a value
of NULL
.
redis.keys
list all matching keys present in the database.
rediscc
was originally written as a replacement of
rredis
so it shares the serialized value format which has a few
odd implications. rredis
doesn't store values directly, but
uses R serialization to store the serialized content in the
value. On the plus side it means that arbitrary values can be stored,
but it also means that storing an integer into a key will result in the
storage of a binary blob such that seemingly intuitive actions like
incrementing it don't work since Redis doesn't recognize it as a
number. Also it means that it is possible to store the value
NULL
in the key but this is not distinguishable from the
deleted key since redis.get
will return NULL
in both
cases.
Simon Urbanek
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.