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

適用対象