OutputCacheProfile.VaryByParam 속성

정의

속성을 가져오거나 설정합니다 VaryByParam .

public:
 property System::String ^ VaryByParam { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("varyByParam")]
public string VaryByParam { get; set; }
[<System.Configuration.ConfigurationProperty("varyByParam")>]
member this.VaryByParam : string with get, set
Public Property VaryByParam As String

속성 값

VaryByParam 값입니다.

특성

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 VaryByParam .


// Get the current VaryByParam.
String varyByParamValue = 
    outputCacheProfile.VaryByParam;

// Set the VaryByParam.
outputCacheProfile.VaryByParam = 
    string.Empty;
  ' Get the current VaryByParam property.
  Dim varyByParamValue As String = _
  outputCacheProfile.VaryByParam

  ' Set the VaryByParam property.
  outputCacheProfile.VaryByParam = _
  String.Empty

설명

캐시 VaryByParam 된 출력을 변경하기 위해 사용되는 세미콜론으로 구분된 매개 변수 집합입니다. GET 쿼리 문자열 또는 폼 POST 매개 변수에 따라 캐시된 출력을 변경할 수 있습니다. 예를 들어 쿼리 문자열 또는 폼 POST 매개 변수와 함께 사용자 제어 이름을 지정하여 캐시에 대한 사용자 제어 출력을 변경할 수 있습니다. 자세한 내용은 여러 버전의 사용자 제어 출력 캐싱을 참조하세요.

이 설정은 VaryByParam 프로필을 사용하여 페이지의 프로필 또는 @ OutputCache 지시문에 정의되어야 합니다.

메모

설정은 OutputCacheProfile.VaryByParamVaryByParam 특성에서 사용하는 것과 동일합니다. "*" 값을 설정하여 모든 매개 변수에 따라 달라지는 것은 권장되지 않습니다. 이로 인해 웹 서버에서 캐시 오버플로 또는 서비스 거부 공격이 발생할 수 있습니다.

적용 대상

추가 정보