You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to have full control of how an instance of StackExchange.IConnectionMultiplexer is created. Typically I have registered the multiplexer in IoC container in my application. I would like to reuse the process of creating the instance and to have more control over its lifecycle.
Suggested solution
New configuration parameter connectionMultiplexerFactoryType will contain type that implements IConnectionMultiplexerFactory:
publicinterfaceIConnectionMultiplexerFactory{/// <summary>/// This method provides either new or already existing instance of <see cref="IConnectionMultiplexer"/>./// </summary>/// <returns>Fully configured connection multiplexer</returns>IConnectionMultiplexerCreateMultiplexer();/// <summary>/// When <see cref="RedisSessionStateProvider"/> fails with <see cref="RedisConnectionException"/>/// then it sends to <see cref="IConnectionMultiplexerFactory"/> and attempt to cleanup a failed multiplexer./// Additionally, the factory itself is responsible for providing a clean, fresh instance of IConnectionMultiplexer (it can be the same instance)./// </summary>/// <param name="connectionMultiplexer">Instance that failed with <see cref="RedisConnectionException"/></param>/// <returns>New or refreshed instance</returns>IConnectionMultiplexerRestartMultiplexer(IConnectionMultiplexerconnectionMultiplexer);}
The text was updated successfully, but these errors were encountered:
footcha
changed the title
Extension point for injecting custom instance of IConnectionMultiplexer
Extension point for injecting custom instance of IConnectionMultiplexerAug 10, 2018
footcha
added a commit
to footcha/aspnet-redis-providers
that referenced
this issue
Aug 10, 2018
I would like to have full control of how an instance of
StackExchange.IConnectionMultiplexer
is created. Typically I have registered the multiplexer in IoC container in my application. I would like to reuse the process of creating the instance and to have more control over its lifecycle.Suggested solution
New configuration parameter
connectionMultiplexerFactoryType
will contain type that implementsIConnectionMultiplexerFactory
:The text was updated successfully, but these errors were encountered: