次の方法で共有


StackExchangeRedisCacheServiceCollectionExtensions.AddStackExchangeRedisCache メソッド

定義

指定した IServiceCollection に Redis 分散キャッシュ サービスを追加します。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::DependencyInjection::IServiceCollection ^ AddStackExchangeRedisCache(Microsoft::Extensions::DependencyInjection::IServiceCollection ^ services, Action<Microsoft::Extensions::Caching::StackExchangeRedis::RedisCacheOptions ^> ^ setupAction);
public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddStackExchangeRedisCache (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions> setupAction);
static member AddStackExchangeRedisCache : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.Extensions.Caching.StackExchangeRedis.RedisCacheOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddStackExchangeRedisCache (services As IServiceCollection, setupAction As Action(Of RedisCacheOptions)) As IServiceCollection

パラメーター

services
IServiceCollection

サービスを追加する先の IServiceCollection

setupAction
Action<RedisCacheOptions>

指定した RedisCacheOptions を構成する Action<T>

戻り値

追加の呼び出しをチェーンできるようにする IServiceCollection

適用対象