Share via


OutputCachePolicyBuilder.SetCacheKeyPrefix Method

Definition

Overloads

SetCacheKeyPrefix(Func<HttpContext,String>)

Adds a policy that varies the cache key using the specified value.

SetCacheKeyPrefix(Func<HttpContext,CancellationToken,ValueTask<String>>)

Adds a policy that varies the cache key using the specified value.

SetCacheKeyPrefix(String)

Adds a policy that varies the cache key using the specified value.

SetCacheKeyPrefix(Func<HttpContext,String>)

Source:
OutputCachePolicyBuilder.cs

Adds a policy that varies the cache key using the specified value.

public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder SetCacheKeyPrefix (Func<Microsoft.AspNetCore.Http.HttpContext,string> keyPrefix);
member this.SetCacheKeyPrefix : Func<Microsoft.AspNetCore.Http.HttpContext, string> -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function SetCacheKeyPrefix (keyPrefix As Func(Of HttpContext, String)) As OutputCachePolicyBuilder

Parameters

keyPrefix
Func<HttpContext,String>

The value to vary the cache key by.

Returns

Applies to

SetCacheKeyPrefix(Func<HttpContext,CancellationToken,ValueTask<String>>)

Source:
OutputCachePolicyBuilder.cs

Adds a policy that varies the cache key using the specified value.

public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder SetCacheKeyPrefix (Func<Microsoft.AspNetCore.Http.HttpContext,System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<string>> keyPrefix);
member this.SetCacheKeyPrefix : Func<Microsoft.AspNetCore.Http.HttpContext, System.Threading.CancellationToken, System.Threading.Tasks.ValueTask<string>> -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function SetCacheKeyPrefix (keyPrefix As Func(Of HttpContext, CancellationToken, ValueTask(Of String))) As OutputCachePolicyBuilder

Parameters

keyPrefix
Func<HttpContext,CancellationToken,ValueTask<String>>

The value to vary the cache key by.

Returns

Applies to

SetCacheKeyPrefix(String)

Source:
OutputCachePolicyBuilder.cs

Adds a policy that varies the cache key using the specified value.

public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder SetCacheKeyPrefix (string keyPrefix);
member this.SetCacheKeyPrefix : string -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function SetCacheKeyPrefix (keyPrefix As String) As OutputCachePolicyBuilder

Parameters

keyPrefix
String

The value to vary the cache key by.

Returns

Applies to