ResponseCachingServicesExtensions.AddResponseCaching 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
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用于添加服务的 。
返回
适用于
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 的委托。