OutputCachePolicyBuilder.VaryByValue Method

Definition

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

varyBy
Func<HttpContext,CancellationToken,ValueTask<KeyValuePair<String,String>>>

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.

Returns

Applies to