Connect to a Redis server.
Connect to an available Redis server on the specified port.
redisConnect(host = "localhost", port = 6379, password = NULL, returnRef = FALSE, nodelay=TRUE, timeout=2678399L)
host |
The Redis server host name or inet address (optional, character). The default value is "localhost". |
port |
The Redis port number (optional, numeric or integer). The default value is 6379L. |
password |
Redis authentication password. |
returnRef |
Set |
nodelay |
Set |
timeout |
Set the R connection timeout (in seconds). Beware that some OSes may treat very large values as zero: however the POSIX standard requires values up to 31 days to be supported. |
A running instance of a Redis server is required. Use 'returnRef' to return the Redis connection state in an environment. Then use the 'redisSetContext' function to switch environment state and manage multiple open Redis connections.
Set nodelay=TRUE
to use the TCP_NODELY socket setting (disabling the TCP
Nagle flow control algorithm) which can improve performance especially for
rapid, non-pipelined small-sized transactions. We follow the convention of
other popular Redis clients like the hiredis C library interface and use
TCP_NODELAY as the default choice.
Note that Redis pipelining can also increase performance:
redisSetPipeline(TRUE)
(q.v.).
Nothing is returned by default. Errors are displayed if the function fails to connect to the specified Redis server. Disconnect from a connected server with redisClose.
If returnRef is set to TRUE and no error occurs, a list describing the
Redis connection will be returned. A future version of the package will
use this feature to support multiple Redis connections with
the attachRedis
function.
B. W. Lewis
http://redis.io/commands
## Not run: redisConnect() redisSet('x',runif(5)) redisGet('x') redisClose() ## End(Not run)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.