PartialCachingAttribute.Duration 속성

정의

캐시된 항목이 출력 캐시에 남아 있어야 하는 시간(초)을 가져옵니다.

public:
 property int Duration { int get(); };
public:
 property int Duration { int get(); void set(int value); };
public int Duration { get; }
public int Duration { get; set; }
member this.Duration : int
member this.Duration : int with get, set
Public ReadOnly Property Duration As Integer
Public Property Duration As Integer

속성 값

사용자 컨트롤이 출력 캐시에 남아 있어야 하는 시간(초)입니다.

예제

다음 코드 예제에서는 생성자를 사용자 정의 컨트롤에 적용할 수 있는 방법을 PartialCachingAttribute(Int32) 보여 줍니다. 이 특성은 사용자 컨트롤을 캐시할 수 있음을 나타내고 20초 캐싱 기간을 지정합니다. 이 코드 예제는 클래스에 제공된 더 큰 예제의 PartialCachingAttribute 일부입니다.

// Set the PartialCachingAttribute.Duration property to 20 seconds.
[PartialCaching(20)]
public partial class ctlMine : UserControl
' Set the PartialCachingAttribute.Duration property to 20 seconds.
<PartialCaching(20)> _
Partial Class ctlMine
    Inherits UserControl

적용 대상