OutputCacheServiceCollectionExtensions.AddOutputCache 方法

定义

重载

AddOutputCache(IServiceCollection)

添加输出缓存服务。

AddOutputCache(IServiceCollection, Action<OutputCacheOptions>)

添加输出缓存服务并配置相关选项。

AddOutputCache(IServiceCollection)

Source:
OutputCacheServiceCollectionExtensions.cs

添加输出缓存服务。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOutputCache (this Microsoft.Extensions.DependencyInjection.IServiceCollection services);
static member AddOutputCache : Microsoft.Extensions.DependencyInjection.IServiceCollection -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOutputCache (services As IServiceCollection) As IServiceCollection

参数

services
IServiceCollection

用于添加服务的 IServiceCollection

返回

适用于

AddOutputCache(IServiceCollection, Action<OutputCacheOptions>)

Source:
OutputCacheServiceCollectionExtensions.cs

添加输出缓存服务并配置相关选项。

public static Microsoft.Extensions.DependencyInjection.IServiceCollection AddOutputCache (this Microsoft.Extensions.DependencyInjection.IServiceCollection services, Action<Microsoft.AspNetCore.OutputCaching.OutputCacheOptions> configureOptions);
static member AddOutputCache : Microsoft.Extensions.DependencyInjection.IServiceCollection * Action<Microsoft.AspNetCore.OutputCaching.OutputCacheOptions> -> Microsoft.Extensions.DependencyInjection.IServiceCollection
<Extension()>
Public Function AddOutputCache (services As IServiceCollection, configureOptions As Action(Of OutputCacheOptions)) As IServiceCollection

参数

services
IServiceCollection

用于添加服务的 IServiceCollection

configureOptions
Action<OutputCacheOptions>

用于配置 OutputCacheOptions的委托。

返回

适用于