Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

redisGet

Retrieve a value from Redis.


Description

Retrieve a value identified by a key from the Redis database.

Usage

redisGet(key, ...)

Arguments

key

The (required) character identifier for the value to be looked up.

...

Optional additional arguments passed to redisCmd. Specify raw=TRUE to skip de-serialization of the data.

Details

The key must not contain spaces or newline characters (otherwise an error will be thrown). The raw option is used to retrieve binary data from other languages.

Value

The value corresponding to the specified key, or NULL if the matching key contained no value or if no matching key was found.

Use the raw=TRUE option to return Redis values in raw binary form, which can optionally later be converted to character using the rawToChar function.

A Redis value that does not represent a serialized R value is returned as a character R value with an attribute named "redis string value." Subsequent uploads of that value to Redis will send the character-valued data in raw form (not as a serialized R value), preserving the original nature of the data in Redis.

Author(s)

B. W. Lewis

References

http://redis.io/commands

See Also

Examples

## Not run: 
redisSet('x',runif(5))
redisGet('x')

## End(Not run)

rredis

"Redis" Key/Value Database Client

v1.7.0
Apache License (>= 2.0)
Authors
B. W. Lewis
Initial release
2015-07-04

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.