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".

@safe
connectRedisDB

Parameters

url URL

Redis URI scheme for a Redis database instance

Return Value

A new RedisDatabase instance that can be used to access the database.

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");

See Also

Meta