Table of Contents

Class RedisCacheServiceCollectionExtensions

Namespace
Steeltoe.Connector.Redis
Assembly
Steeltoe.Connector.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

services IServiceCollection

Service collection to add to

applicationConfiguration IConfiguration

App configuration

connectorConfiguration IConfiguration

Connector configuration

serviceName string

Name of service to add

contextLifetime ServiceLifetime

Microsoft.Extensions.DependencyInjection.ServiceLifetime of the service to inject

addSteeltoeHealthChecks bool

Add 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 IServiceCollection

Service collection to add to

config IConfiguration

App configuration

addSteeltoeHealthChecks bool

Add 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 IServiceCollection

Service collection to add to

config IConfiguration

App configuration

serviceName string

Name of service to add

addSteeltoeHealthChecks bool

Add 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 IServiceCollection

Service collection to add to

applicationConfiguration IConfiguration

App configuration

connectorConfiguration IConfiguration

Connector configuration

serviceName string

Name of service to add

contextLifetime ServiceLifetime

Microsoft.Extensions.DependencyInjection.ServiceLifetime of the service to inject

addSteeltoeHealthChecks bool

Add 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 IServiceCollection

Service collection to add to

config IConfiguration

App configuration

addSteeltoeHealthChecks bool

Add 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 IServiceCollection

Service collection to add to

config IConfiguration

App configuration

serviceName string

Name of service to add

addSteeltoeHealthChecks bool

Add Steeltoe health check when community healthchecks exist

Returns

IServiceCollection

IServiceCollection for chaining

Remarks

ConnectionMultiplexer is retrievable as both ConnectionMultiplexer and IConnectionMultiplexer