共用方式為


OutputCacheOptions.AddBasePolicy 方法

定義

多載

AddBasePolicy(IOutputCachePolicy)

IOutputCachePolicy 實例新增至基底原則。

AddBasePolicy(Action<OutputCachePolicyBuilder>)

IOutputCachePolicy 實例建置並新增至基底原則。

AddBasePolicy(Action<OutputCachePolicyBuilder>, Boolean)

IOutputCachePolicy 實例建置並新增至基底原則。

AddBasePolicy(IOutputCachePolicy)

來源:
OutputCacheOptions.cs

IOutputCachePolicy 實例新增至基底原則。

public void AddBasePolicy (Microsoft.AspNetCore.OutputCaching.IOutputCachePolicy policy);
member this.AddBasePolicy : Microsoft.AspNetCore.OutputCaching.IOutputCachePolicy -> unit
Public Sub AddBasePolicy (policy As IOutputCachePolicy)

參數

policy
IOutputCachePolicy

要新增的原則

適用於

AddBasePolicy(Action<OutputCachePolicyBuilder>)

來源:
OutputCacheOptions.cs

IOutputCachePolicy 實例建置並新增至基底原則。

public void AddBasePolicy (Action<Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder> build);
member this.AddBasePolicy : Action<Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder> -> unit
Public Sub AddBasePolicy (build As Action(Of OutputCachePolicyBuilder))

參數

備註

建置的原則會以預設原則為基礎。

適用於

AddBasePolicy(Action<OutputCachePolicyBuilder>, Boolean)

來源:
OutputCacheOptions.cs

IOutputCachePolicy 實例建置並新增至基底原則。

public void AddBasePolicy (Action<Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder> build, bool excludeDefaultPolicy);
member this.AddBasePolicy : Action<Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder> * bool -> unit
Public Sub AddBasePolicy (build As Action(Of OutputCachePolicyBuilder), excludeDefaultPolicy As Boolean)

參數

excludeDefaultPolicy
Boolean

是否要排除默認原則。

適用於