Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

StackExchangeRedisOutputCacheServiceCollectionExtensions.AddStackExchangeRedisOutputCache Method

Definition

Namespace:
Microsoft.Extensions.DependencyInjection
Assembly:
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis.dll
Package:
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis v10.0.0
Package:
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis v11.0.0-preview.4.26230.115
Source:
StackExchangeRedisCacheServiceCollectionExtensions.cs
Source:
StackExchangeRedisCacheServiceCollectionExtensions.cs

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.

Adds Redis output caching services to the specified IServiceCollection.

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddStackExchangeRedisOutputCache(this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.OutputCaching.StackExchangeRedis.RedisOutputCacheOptions> setupAction);
static member AddStackExchangeRedisOutputCache : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.OutputCaching.StackExchangeRedis.RedisOutputCacheOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddStackExchangeRedisOutputCache (services As IServiceCollection, setupAction As Action(Of RedisOutputCacheOptions)) As IServiceCollection

Parameters

services
IServiceCollection

The IServiceCollection to add services to.

setupAction
Action<RedisOutputCacheOptions>

An Action<T> to configure the provided RedisOutputCacheOptions.

Returns

The IServiceCollection so that additional calls can be chained.

Applies to


Feedback

Was this page helpful?