Class RedisCacheServiceCollectionExtensions
- Namespace
- Steeltoe.CloudFoundry.Connector.Redis
- Assembly
- Steeltoe.CloudFoundry.ConnectorCore.dll
public static class RedisCacheServiceCollectionExtensions
- Inheritance
-
RedisCacheServiceCollectionExtensions
- Inherited Members
Methods
AddDistributedRedisCache(IServiceCollection, IConfiguration, IConfiguration, string, ServiceLifetime, bool)
Add IDistributedCache and its IHealthContributor to ServiceCollection
public static IServiceCollection AddDistributedRedisCache(this IServiceCollection services, IConfiguration applicationConfiguration, IConfiguration connectorConfiguration, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
applicationConfigurationIConfigurationApp configuration
connectorConfigurationIConfigurationConnector configuration
serviceNamestringName of service to add
contextLifetimeServiceLifetimeMicrosoft.Extensions.DependencyInjection.ServiceLifetime of the service to inject
addSteeltoeHealthChecksboolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RedisCache is retrievable as both RedisCache and IDistributedCache
AddDistributedRedisCache(IServiceCollection, IConfiguration, ILoggerFactory, bool)
Add IDistributedCache and its IHealthContributor to ServiceCollection
public static IServiceCollection AddDistributedRedisCache(this IServiceCollection services, IConfiguration config, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
logFactoryILoggerFactorylogger factory
addSteeltoeHealthChecksboolAdd steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RedisCache is retrievable as both RedisCache and IDistributedCache
AddDistributedRedisCache(IServiceCollection, IConfiguration, string, ILoggerFactory, bool)
Add IDistributedCache and its IHealthContributor to ServiceCollection
public static IServiceCollection AddDistributedRedisCache(this IServiceCollection services, IConfiguration config, string serviceName, ILoggerFactory logFactory = null, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
serviceNamestringName of service to add
logFactoryILoggerFactorylogger factory
addSteeltoeHealthChecksboolAdd steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RedisCache is retrievable as both RedisCache and IDistributedCache
AddRedisConnectionMultiplexer(IServiceCollection, IConfiguration, IConfiguration, string, ServiceLifetime, bool)
Add Redis Connection Multiplexer and its IHealthContributor to ServiceCollection
public static IServiceCollection AddRedisConnectionMultiplexer(this IServiceCollection services, IConfiguration applicationConfiguration, IConfiguration connectorConfiguration, string serviceName, ServiceLifetime contextLifetime = ServiceLifetime.Singleton, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
applicationConfigurationIConfigurationApp configuration
connectorConfigurationIConfigurationConnector configuration
serviceNamestringName of service to add
contextLifetimeServiceLifetimeMicrosoft.Extensions.DependencyInjection.ServiceLifetime of the service to inject
addSteeltoeHealthChecksboolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
ConnectionMultiplexer is retrievable as both ConnectionMultiplexer and IConnectionMultiplexer
AddRedisConnectionMultiplexer(IServiceCollection, IConfiguration, bool)
Add Redis Connection Multiplexer and its IHealthContributor to ServiceCollection
public static IServiceCollection AddRedisConnectionMultiplexer(this IServiceCollection services, IConfiguration config, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
addSteeltoeHealthChecksboolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
ConnectionMultiplexer is retrievable as both ConnectionMultiplexer and IConnectionMultiplexer
AddRedisConnectionMultiplexer(IServiceCollection, IConfiguration, string, bool)
Add Redis Connection Multiplexer and its IHealthContributor to ServiceCollection
public static IServiceCollection AddRedisConnectionMultiplexer(this IServiceCollection services, IConfiguration config, string serviceName, bool addSteeltoeHealthChecks = false)
Parameters
servicesIServiceCollectionService collection to add to
configIConfigurationApp configuration
serviceNamestringName of service to add
addSteeltoeHealthChecksboolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
ConnectionMultiplexer is retrievable as both ConnectionMultiplexer and IConnectionMultiplexer