Examples for 'rediscc::redis.connect'


Manage connections to a Redis database

Aliases: redis.connect redis.clone redis.close

Keywords: database

### ** Examples

## try connecting - 
c <- tryCatch(redis.connect(),
              error = function(e) {
                cat("Cannot connect",e$message, " - please start Redis\n")
                NULL
              })
if (!is.null(c)) { ## go ahead only if Redis is up and we got a connection
  print(redis.get(c, "foo"))
  print(redis.set(c, "foo", "bar"))
  print(redis.get(c, "foo"))
  redis.rm(c, "foo")
  redis.close(c)
}
NULL
NULL
[1] "bar"

[Package rediscc version 0.1-6 Index]