Share via


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

속성 값

Int32

기간을 나타내는 시간(초)입니다.

특성

예제

다음 코드 예제에서는 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 프로필을 사용 하 여 페이지의 지시문에 정의 되어야 합니다.

적용 대상

추가 정보