HttpCachePolicy.SetVaryByCustom(String) 메서드

정의

캐시된 출력 응답을 변경할 사용자 지정 텍스트 문자열을 지정합니다.

public:
 void SetVaryByCustom(System::String ^ custom);
public void SetVaryByCustom(string custom);
member this.SetVaryByCustom : string -> unit
Public Sub SetVaryByCustom (custom As String)

매개 변수

custom
String

캐시된 출력을 변경할 텍스트 문자열입니다.

예외

customnull입니다.

메서드가 SetVaryByCustom(String) 이미 호출되었습니다.

예제

다음 코드 예제에서는 사용자 지정 다양한 문자열을 "Accept-Charset"으로 설정하여 원본 서버의 캐시가 브라우저 Accept-Charset 의 헤더에 따라 여러 캐시된 응답 중 하나를 선택하게 하는 방법을 보여 줍니다.

Response.Cache.SetVaryByCustom("Accept-Charset");
Response.Cache.SetVaryByCustom("Accept-Charset")

설명

SetVaryByCustom .NET Framework 버전 3.5에 도입되었습니다. 자세한 내용은 버전 및 종속성을 참조하세요.

적용 대상