Function connectRedisDB
Returns a Redis database connection instance corresponding to the given URL.
The URL must be of the format "redis://server[:port]/dbnum".
Authentication
Authenticated connections are supported by using a URL connection string such as "redis://password@host".
Examples
// connecting with default settings:
auto redisDB = connectRedisDB("redis://127.0.0.1");
// connecting using the URL form with custom settings
auto redisDB = connectRedisDB("redis://password:myremotehost/3?maxmemory=10000000");
Parameters
Name | Description |
---|---|
url | Redis URI scheme for a Redis database instance |
Returns
A new RedisDatabase instance that can be used to access the database.