Share via


OutputCachePolicyBuilder.SetVaryByQuery Method

Definition

Overloads

SetVaryByQuery(String[])

Adds a policy to vary the cached responses by query strings.

SetVaryByQuery(String, String[])

Adds a policy to vary the cached responses by query strings.

SetVaryByQuery(String[])

Source:
OutputCachePolicyBuilder.cs

Adds a policy to vary the cached responses by query strings.

public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder SetVaryByQuery (string[] queryKeys);
member this.SetVaryByQuery : string[] -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function SetVaryByQuery (queryKeys As String()) As OutputCachePolicyBuilder

Parameters

queryKeys
String[]

The query keys to vary the cached responses by.

Returns

Remarks

By default all query keys vary the cache entries. However when specific query keys are specified only these are then taken into account.

Applies to

SetVaryByQuery(String, String[])

Source:
OutputCachePolicyBuilder.cs

Adds a policy to vary the cached responses by query strings.

public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder SetVaryByQuery (string queryKey, params string[] queryKeys);
member this.SetVaryByQuery : string * string[] -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function SetVaryByQuery (queryKey As String, ParamArray queryKeys As String()) As OutputCachePolicyBuilder

Parameters

queryKey
String

The query key to vary the cached responses by.

queryKeys
String[]

The extra query keys to vary the cached responses by.

Returns

Remarks

By default all query keys vary the cache entries. However when specific query keys are specified only these are then taken into account.

Applies to