共用方式為


OutputCacheServiceCollectionExtensions.AddOutputCache 方法

定義

多載

AddOutputCache(IServiceCollection)

新增輸出快取服務。

AddOutputCache(IServiceCollection, Action<OutputCacheOptions>)

新增輸出快取服務並設定相關選項。

AddOutputCache(IServiceCollection)

來源:
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>)

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

傳回

適用於