Functions
redis::get
: Returns the value of the key being looked up orundef
if the key does not exist. Takes two arguments with an optional third. The first bein
Type: Ruby 4.x API
Returns the value of the key being looked up or undef
if the key does not
exist. Takes two arguments with an optional third. The first being a string
value of the key to be looked up, the second is the URL to the Redis service
and the third optional argument is a default value to be used if the lookup
fails.
example usage
$version = redis::get('version.myapp', 'redis://redis.example.com:6379')
$version_with_default = redis::get('version.myapp', 'redis://redis.example.com:6379', $::myapp_version)
Returns the value of the key being looked up or undef
if the key does not
exist. Takes two arguments with an optional third. The first being a string
value of the key to be looked up, the second is the URL to the Redis service
and the third optional argument is a default value to be used if the lookup
fails.
example usage
$version = redis::get('version.myapp', 'redis://redis.example.com:6379')
$version_with_default = redis::get('version.myapp', 'redis://redis.example.com:6379', $::myapp_version)
Returns: Optional[String]
Returns the value of the key from Redis
Data type: String[1]
The key to look up in redis
Data type: Redis::RedisUrl
The endpoint of the Redis instance
Data type: Optional[String]
The value to return if the key is not found or the connection to Redis fails