OutputCachePolicyBuilder.SetCacheKeyPrefix 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
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.