OutputCacheOptions.AddBasePolicy Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
AddBasePolicy(IOutputCachePolicy) |
Adds an IOutputCachePolicy instance to base policies. |
AddBasePolicy(Action<OutputCachePolicyBuilder>) |
Builds and adds an IOutputCachePolicy instance to base policies. |
AddBasePolicy(Action<OutputCachePolicyBuilder>, Boolean) |
Builds and adds an IOutputCachePolicy instance to base policies. |
AddBasePolicy(IOutputCachePolicy)
- Source:
- OutputCacheOptions.cs
Adds an IOutputCachePolicy instance to base policies.
public void AddBasePolicy (Microsoft.AspNetCore.OutputCaching.IOutputCachePolicy policy);
member this.AddBasePolicy : Microsoft.AspNetCore.OutputCaching.IOutputCachePolicy -> unit
Public Sub AddBasePolicy (policy As IOutputCachePolicy)
Parameters
- policy
- IOutputCachePolicy
The policy to add
Applies to
AddBasePolicy(Action<OutputCachePolicyBuilder>)
- Source:
- OutputCacheOptions.cs
Builds and adds an IOutputCachePolicy instance to base policies.
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))
Parameters
- build
- Action<OutputCachePolicyBuilder>
An action on OutputCachePolicyBuilder.
Remarks
The built policy will be based on the default policy.
Applies to
AddBasePolicy(Action<OutputCachePolicyBuilder>, Boolean)
- Source:
- OutputCacheOptions.cs
Builds and adds an IOutputCachePolicy instance to base policies.
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)
Parameters
- build
- Action<OutputCachePolicyBuilder>
An action on OutputCachePolicyBuilder.
- excludeDefaultPolicy
- Boolean
Whether to exclude the default policy or not.