Class RedisCacheServiceCollectionExtensions
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
services
IServiceCollectionService collection to add to
applicationConfiguration
IConfigurationApp configuration
connectorConfiguration
IConfigurationConnector configuration
serviceName
stringName of service to add
contextLifetime
ServiceLifetimeMicrosoft.Extensions.DependencyInjection.ServiceLifetime of the service to inject
addSteeltoeHealthChecks
boolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
RedisCache is retrievable as both RedisCache and IDistributedCache
AddDistributedRedisCache(IServiceCollection, IConfiguration, bool)
Add IDistributedCache and its IHealthContributor to ServiceCollection
public static IServiceCollection AddDistributedRedisCache(this IServiceCollection services, IConfiguration config, bool addSteeltoeHealthChecks = false)
Parameters
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
addSteeltoeHealthChecks
boolAdd 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, bool)
Add IDistributedCache and its IHealthContributor to ServiceCollection
public static IServiceCollection AddDistributedRedisCache(this IServiceCollection services, IConfiguration config, string serviceName, bool addSteeltoeHealthChecks = false)
Parameters
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
serviceName
stringName of service to add
addSteeltoeHealthChecks
boolAdd 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
services
IServiceCollectionService collection to add to
applicationConfiguration
IConfigurationApp configuration
connectorConfiguration
IConfigurationConnector configuration
serviceName
stringName of service to add
contextLifetime
ServiceLifetimeMicrosoft.Extensions.DependencyInjection.ServiceLifetime of the service to inject
addSteeltoeHealthChecks
boolAdd 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
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
addSteeltoeHealthChecks
boolAdd 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
services
IServiceCollectionService collection to add to
config
IConfigurationApp configuration
serviceName
stringName of service to add
addSteeltoeHealthChecks
boolAdd Steeltoe health check when community healthchecks exist
Returns
- IServiceCollection
IServiceCollection for chaining
Remarks
ConnectionMultiplexer is retrievable as both ConnectionMultiplexer and IConnectionMultiplexer