Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
OutputCachePolicyBuilder.SetVaryByHeader Method
Definition
- Namespace:
- Microsoft.AspNetCore.OutputCaching
- Assembly:
- Microsoft.AspNetCore.OutputCaching.dll
- Package:
- Microsoft.AspNetCore.App.Ref v10.0.0
- Package:
- Microsoft.AspNetCore.App.Ref v11.0.0-preview.4.26230.115
- Package:
- Microsoft.AspNetCore.App.Ref v7.0.5
- Package:
- Microsoft.AspNetCore.App.Ref v8.0.19
- Package:
- Microsoft.AspNetCore.App.Ref v9.0.8
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
| Name | Description |
|---|---|
| SetVaryByHeader(String, String[]) |
Adds a policy to vary the cached responses by header. |
| SetVaryByHeader(String[]) |
Adds a policy to vary the cached responses by header. |
SetVaryByHeader(String, String[])
- Source:
- OutputCachePolicyBuilder.cs
Adds a policy to vary the cached responses by header.
public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder SetVaryByHeader(string headerName, params string[] headerNames);
member this.SetVaryByHeader : string * string[] -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function SetVaryByHeader (headerName As String, ParamArray headerNames As String()) As OutputCachePolicyBuilder
Parameters
- headerName
- String
The header name to vary the cached responses by.
- headerNames
- String[]
Additional header names to vary the cached responses by.
Returns
Applies to
SetVaryByHeader(String[])
- Source:
- OutputCachePolicyBuilder.cs
Adds a policy to vary the cached responses by header.
public Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder SetVaryByHeader(string[] headerNames);
member this.SetVaryByHeader : string[] -> Microsoft.AspNetCore.OutputCaching.OutputCachePolicyBuilder
Public Function SetVaryByHeader (headerNames As String()) As OutputCachePolicyBuilder
Parameters
- headerNames
- String[]
The header names to vary the cached responses by.
Returns
Applies to
Feedback
Was this page helpful?
