다음을 통해 공유


OutputCacheProfile.Duration 속성

정의

페이지 또는 컨트롤이 캐시되는 기간을 가져오거나 설정합니다.

public:
 property int Duration { int get(); void set(int value); };
[System.Configuration.ConfigurationProperty("duration", DefaultValue=-1)]
public int Duration { get; set; }
[<System.Configuration.ConfigurationProperty("duration", DefaultValue=-1)>]
member this.Duration : int with get, set
Public Property Duration As Integer

속성 값

시간 기간(초)입니다.

특성

예제

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


// Get the current Duration.
Int32 durationValue = 
    outputCacheProfile.Duration;

// Set the Duration property to 0.
outputCacheProfile.Duration = 0;
  ' Get the current Duration.
  Dim durationValue As Int32 = _
  outputCacheProfile.Duration

  ' Set the Duration.
outputCacheProfile.Duration = 0

설명

페이지 Duration 또는 사용자 컨트롤이 캐시되는 시간(초)을 나타냅니다. 이 속성을 설정하면 페이지 또는 해당 응답이 적용되는 컨트롤의 HTTP 응답에 대한 만료 정책이 설정되고 출력이 자동으로 캐싱됩니다.

메모

프로필을 Duration 사용하여 페이지의 프로필 또는 @ OutputCache 지시문에 정의해야 합니다.

적용 대상

추가 정보