Page.InitOutputCache 메서드

정의

현재 페이지 요청에 대한 출력 캐시를 초기화합니다.

오버로드

Name Description
InitOutputCache(Int32, String, String, OutputCacheLocation, String)

현재 페이지 요청에 대한 출력 캐시를 초기화합니다.

InitOutputCache(Int32, String, String, String, OutputCacheLocation, String)

현재 페이지 요청에 대한 출력 캐시를 초기화합니다.

InitOutputCache(OutputCacheParameters)

개체를 기반으로 현재 페이지 요청에 대한 출력 캐시를 OutputCacheParameters 초기화합니다.

설명

이 메서드는 코드에서 직접 사용할 수 없습니다. 페이지에 대한 출력 캐싱을 사용하도록 설정하고 조작하려면 다음 방법 중 하나를 사용합니다.

  • .aspx 파일의 @ OutputCache 지시문을 사용하여 선언적으로 옵션을 설정합니다.
  • 페이지 코드의 개체에 HttpCachePolicy 의해 노출되는 클래스의 Response.Cache 메서드와 속성을 사용합니다.

자세한 내용은 ASP.NET 페이지 캐시 참조하세요.

InitOutputCache(Int32, String, String, OutputCacheLocation, String)

현재 페이지 요청에 대한 출력 캐시를 초기화합니다.

protected:
 virtual void InitOutputCache(int duration, System::String ^ varyByHeader, System::String ^ varyByCustom, System::Web::UI::OutputCacheLocation location, System::String ^ varyByParam);
protected virtual void InitOutputCache(int duration, string varyByHeader, string varyByCustom, System.Web.UI.OutputCacheLocation location, string varyByParam);
abstract member InitOutputCache : int * string * string * System.Web.UI.OutputCacheLocation * string -> unit
override this.InitOutputCache : int * string * string * System.Web.UI.OutputCacheLocation * string -> unit
Protected Overridable Sub InitOutputCache (duration As Integer, varyByHeader As String, varyByCustom As String, location As OutputCacheLocation, varyByParam As String)

매개 변수

duration
Int32

출력 캐시에 저장된 개체가 유효한 시간입니다.

varyByHeader
String

출력 캐시의 콘텐츠가 달라질 수 있는 세미콜론으로 구분된 헤더 목록입니다.

varyByCustom
String

HTTP 헤더입니다 Vary .

location
OutputCacheLocation

값 중 OutputCacheLocation 하나입니다.

varyByParam
String

출력 캐시의 콘텐츠가 달라지는 GET 또는 POST 메서드에서 받은 매개 변수의 세미콜론으로 구분된 목록입니다.

예외

에 대해 잘못된 값이 지정되었습니다 location.

설명

이 메서드를 호출하면 안 됩니다. 페이지에 대한 출력 캐싱을 사용하도록 설정하고 조작하려면 .aspx 파일의 지시문 또는 클래스의 @ OutputCache 메서드와 속성을 사용합니다HttpCachePolicy. 후자는 페이지 코드의 구문을 통해 Response.Cache 액세스할 수 있습니다. 자세한 내용은 ASP.NET 페이지 캐시 참조하세요.

추가 정보

적용 대상

InitOutputCache(Int32, String, String, String, OutputCacheLocation, String)

현재 페이지 요청에 대한 출력 캐시를 초기화합니다.

protected:
 virtual void InitOutputCache(int duration, System::String ^ varyByContentEncoding, System::String ^ varyByHeader, System::String ^ varyByCustom, System::Web::UI::OutputCacheLocation location, System::String ^ varyByParam);
protected virtual void InitOutputCache(int duration, string varyByContentEncoding, string varyByHeader, string varyByCustom, System.Web.UI.OutputCacheLocation location, string varyByParam);
abstract member InitOutputCache : int * string * string * string * System.Web.UI.OutputCacheLocation * string -> unit
override this.InitOutputCache : int * string * string * string * System.Web.UI.OutputCacheLocation * string -> unit
Protected Overridable Sub InitOutputCache (duration As Integer, varyByContentEncoding As String, varyByHeader As String, varyByCustom As String, location As OutputCacheLocation, varyByParam As String)

매개 변수

duration
Int32

출력 캐시에 저장된 개체가 유효한 시간입니다.

varyByContentEncoding
String

출력 캐시의 콘텐츠가 달라지는 문자 집합(콘텐츠 인코딩)의 세미콜론으로 구분된 목록입니다.

varyByHeader
String

출력 캐시의 콘텐츠가 달라질 수 있는 세미콜론으로 구분된 헤더 목록입니다.

varyByCustom
String

HTTP 헤더입니다 Vary .

location
OutputCacheLocation

값 중 OutputCacheLocation 하나입니다.

varyByParam
String

출력 캐시의 콘텐츠가 달라지는 GET 또는 POST 메서드에서 받은 매개 변수의 세미콜론으로 구분된 목록입니다.

예외

에 대해 잘못된 값이 지정되었습니다 location.

설명

이 메서드를 호출하면 안 됩니다. 페이지에 대한 출력 캐싱을 사용하도록 설정하고 조작하려면 .aspx 파일의 지시문이나 클래스의 @ OutputCache 메서드 및 속성을 사용합니다HttpCachePolicy. 후자는 페이지 코드의 구문을 통해 Response.Cache 액세스할 수 있습니다. 자세한 내용은 ASP.NET 페이지 캐시 참조하세요.

추가 정보

적용 대상

InitOutputCache(OutputCacheParameters)

개체를 기반으로 현재 페이지 요청에 대한 출력 캐시를 OutputCacheParameters 초기화합니다.

protected public:
 virtual void InitOutputCache(System::Web::UI::OutputCacheParameters ^ cacheSettings);
protected internal virtual void InitOutputCache(System.Web.UI.OutputCacheParameters cacheSettings);
abstract member InitOutputCache : System.Web.UI.OutputCacheParameters -> unit
override this.InitOutputCache : System.Web.UI.OutputCacheParameters -> unit
Protected Friend Overridable Sub InitOutputCache (cacheSettings As OutputCacheParameters)

매개 변수

cacheSettings
OutputCacheParameters

OutputCacheParameters 캐시 설정을 포함하는 항목입니다.

예외

캐시 프로필을 찾을 수 없습니다.

-또는-

누락된 지시문 또는 구성 설정 프로필 특성입니다.

출력 캐시 설정 위치가 잘못되었습니다.

설명

이 메서드를 호출하면 안 됩니다. 페이지에 대한 출력 캐싱을 사용하도록 설정하고 조작하려면 .aspx 파일의 지시문 또는 클래스의 @ OutputCache 메서드와 속성을 사용합니다HttpCachePolicy. 후자는 페이지의 코드 선언 블록 또는 코드 숨김 파일의 구문을 통해 Response.Cache 액세스할 수 있습니다. 자세한 내용은 ASP.NET 페이지 캐시 참조하세요.

추가 정보

적용 대상