redisGet: Retrieve a value from Redis.

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/strValCMD.R

Description

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

Usage

1
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

redisSet

Examples

1
2
3
4
5
## Not run: 
redisSet('x',runif(5))
redisGet('x')

## End(Not run)

rredis documentation built on May 2, 2019, 2:02 p.m.