PartialCachingAttribute.Duration 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
출력 캐시에 캐시된 항목을 보관해야 하는 시간(초)을 가져옵니다.
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