ResponseCachingServicesExtensions.AddResponseCaching 方法

定义

重载

AddResponseCaching(IServiceCollection)

添加响应缓存服务。

AddResponseCaching(IServiceCollection, Action<ResponseCachingOptions>)

添加响应缓存服务并配置相关选项。

AddResponseCaching(IServiceCollection)

添加响应缓存服务。

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

参数

services
IServiceCollection

IServiceCollection用于添加服务。

返回

IServiceCollection

适用于

AddResponseCaching(IServiceCollection, Action<ResponseCachingOptions>)

添加响应缓存服务并配置相关选项。

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

参数

services
IServiceCollection

IServiceCollection用于添加服务。

configureOptions
Action<ResponseCachingOptions>

用于配置 ResponseCachingOptions 的委托。

返回

IServiceCollection

适用于