Closed LuckyFellow closed 8 years ago
This issue was caused because of the wrong fix in Ticket #15. After applying the correct fix from Ticket #15, this issue resolved.
Maybe a warning would be useful if a connection is defined without servers so that default values are used.
The Role::Connection role will create a parameters with the "name" in the plugin.
If your plugin consumes the role:
with 'Mail::MtPolicyd::Role::Connection' => {
name => 'myredis',
type => 'Redis',
};
It will have a parameter myredis which defaults to "myredis" as value.
In your config you can set the myredis parameter to the connection you want to use for myredis:
<Plugin abc>
module = "PluginAbc"
myredis = "redisVolatile"
# or
# myredis = "redisPersistent"
</Plugin>
it seems like it is not possible to have different connections of the same type. Though no error is issued but within plugins it is not possible to specify which connection to utilize.
Usecase is to have two different Redis instances. One is pure volatile the other is persistent with data written to disk.
Example "Connection" configuration:
When accessing a redis connection inside of a plugin, there is always the same connection returned. For example:
returns the same Redis connection as:
Though my expected result is that the corresponding, named connection redisPersistent is returned in the first example and redisVolatile in the second.