OutputCachePolicyBuilder.VaryByValue 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
VaryByValue(Func<HttpContext,KeyValuePair<String,String>>) |
Adds a policy to vary the cached responses by custom key/value. |
VaryByValue(Func<HttpContext,CancellationToken,ValueTask<KeyValuePair<String,String>>>) |
Adds a policy that vary the cached content based on the specified value. |
VaryByValue(String, String) |
Adds a policy to vary the cached responses by custom key/value. |
VaryByValue(Func<HttpContext,KeyValuePair<String,String>>)
- Source:
- OutputCachePolicyBuilder.cs
Adds a policy to vary the cached responses by custom key/value.
public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder VaryByValue (Func<Microsoft.AspNetCore.Http.HttpContext,System.Collections.Generic.KeyValuePair<string,string>> varyBy);
member this.VaryByValue : Func<Microsoft.AspNetCore.Http.HttpContext, System.Collections.Generic.KeyValuePair<string, string>> -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function VaryByValue (varyBy As Func(Of HttpContext, KeyValuePair(Of String, String))) As OutputCachePolicyBuilder
Parameters
- varyBy
- Func<HttpContext,KeyValuePair<String,String>>
The key/value to vary the cached responses by.
Returns
Applies to
VaryByValue(Func<HttpContext,CancellationToken,ValueTask<KeyValuePair<String,String>>>)
- Source:
- OutputCachePolicyBuilder.cs
Adds a policy that vary the cached content based on the specified value.
public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder VaryByValue (Func<Microsoft.AspNetCore.Http.HttpContext,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.Collections.Generic.KeyValuePair<string,string>>> varyBy);
member this.VaryByValue : Func<Microsoft.AspNetCore.Http.HttpContext, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<System.Collections.Generic.KeyValuePair<string, string>>> -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function VaryByValue (varyBy As Func(Of HttpContext, CancellationToken, ValueTask(Of KeyValuePair(Of String, String)))) As OutputCachePolicyBuilder
Parameters
The key/value to vary the cached responses by.
Returns
Applies to
VaryByValue(String, String)
- Source:
- OutputCachePolicyBuilder.cs
Adds a policy to vary the cached responses by custom key/value.
public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder VaryByValue (string key, string value);
member this.VaryByValue : string * string -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function VaryByValue (key As String, value As String) As OutputCachePolicyBuilder
Parameters
- key
- String
The key to vary the cached responses by.
- value
- String
The value to vary the cached responses by.