AspireRedisClientBuilder Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides a builder for configuring Redis client services using StackExchange.Redis in an Aspire application.
public sealed class AspireRedisClientBuilder
type AspireRedisClientBuilder = class
Public NotInheritable Class AspireRedisClientBuilder
- Inheritance
-
AspireRedisClientBuilder
Constructors
| AspireRedisClientBuilder(IHostApplicationBuilder, StackExchangeRedisSettings, String) |
Provides a builder for configuring Redis client services using StackExchange.Redis in an Aspire application. |
Properties
| HostBuilder |
Gets the IHostApplicationBuilder with which services are being registered. |
| ServiceKey |
Gets the service key used to register the StackExchange.Redis.IConnectionMultiplexer service, if any. |
| Settings |
Gets the StackExchangeRedisSettings used to configure the Redis client. |
Extension Methods
| WithAzureAuthentication(AspireRedisClientBuilder, TokenCredential) |
Configures the Redis client to use Azure AD authentication for connecting to Azure Cache for Redis. |
| WithDistributedCache(AspireRedisClientBuilder, Action<RedisCacheOptions>) |
Configures the Redis client to also provide distributed caching services through IDistributedCache. |
| WithKeyedDistributedCache(AspireRedisClientBuilder, String, Action<RedisCacheOptions>) |
Configures the Redis client to provide a keyed distributed caching service through IDistributedCache using |
| WithOutputCache(AspireRedisClientBuilder) |
Configures the Redis client to provide output caching services through IOutputCacheStore. |