OutputCachePolicyBuilder.VaryByValue 方法

定义

重载

VaryByValue(Func<HttpContext,KeyValuePair<String,String>>)

添加策略以根据自定义键/值改变缓存的响应。

VaryByValue(Func<HttpContext,CancellationToken,ValueTask<KeyValuePair<String,String>>>)

添加根据指定值更改缓存内容的策略。

VaryByValue(String, String)

添加策略以根据自定义键/值改变缓存的响应。

VaryByValue(Func<HttpContext,KeyValuePair<String,String>>)

Source:
OutputCachePolicyBuilder.cs

添加策略以根据自定义键/值改变缓存的响应。

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

参数

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

要更改缓存响应的键/值。

返回

适用于

VaryByValue(Func<HttpContext,CancellationToken,ValueTask<KeyValuePair<String,String>>>)

Source:
OutputCachePolicyBuilder.cs

添加根据指定值更改缓存内容的策略。

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

参数

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

要更改缓存响应的键/值。

返回

适用于

VaryByValue(String, String)

Source:
OutputCachePolicyBuilder.cs

添加策略以根据自定义键/值改变缓存的响应。

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

参数

key
String

要更改缓存响应的键。

value
String

要更改缓存响应的值。

返回

适用于