OutputCachePolicyBuilder.SetVaryByHeader 方法

定义

重载

SetVaryByHeader(String, String[])

添加策略以按标头更改缓存的响应。

SetVaryByHeader(String[])

添加策略以按标头更改缓存的响应。

SetVaryByHeader(String, String[])

Source:
OutputCachePolicyBuilder.cs

添加策略以按标头更改缓存的响应。

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

参数

headerName
String

要更改缓存响应的标头名称。

headerNames
String[]

其他标头名称,以改变缓存的响应。

返回

适用于

SetVaryByHeader(String[])

Source:
OutputCachePolicyBuilder.cs

添加策略以按标头更改缓存的响应。

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

参数

headerNames
String[]

要更改缓存响应的标头名称。

返回

适用于