Learn R Programming

rredis (version 1.6.9)

redisRandomKey: Return a randomly selected key from the currently selected database.

Description

Return a randomly selected key from the currently selected database.

Usage

redisRandomKey()

Arguments

Value

  • A character string corresponding to a randomly-selected key from the currently selected database, or a zero-length string if no keys are defined.

Details

Note that this function returns key names, not values.

References

http://redis.io/commands

Examples

Run this code
redisConnect()
redisRandomKey()

Run the code above in your browser using DataLab