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 的委派。