redisConnect(host = "localhost", port = 6379, password = NULL, returnRef = FALSE, nodelay=TRUE, timeout=2678399L)
returnRef=TRUE
to return the environment that contains the Redis connection state (see details). The default value is FALSE.nodelay=TRUE
to use TCP_NODELAY
(that is, to disbable the TCP Nagle algorithm). The default value is
TRUE
, see the details below.attachRedis
function.
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.).
redisClose
redisGetContext
redisSetContext
redisSetPipeline
redisGetResponse
## Not run:
# redisConnect()
# redisSet('x',runif(5))
# redisGet('x')
# redisClose()
# ## End(Not run)
Run the code above in your browser using DataLab