PartialCachingAttribute.Duration Propriedade
Definição
Importante
Algumas informações dizem respeito a um produto pré-lançado que pode ser substancialmente modificado antes de ser lançado. A Microsoft não faz garantias, de forma expressa ou implícita, em relação à informação aqui apresentada.
Obtém o tempo, em segundos, que os itens em cache devem permanecer na cache de saída.
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
Valor de Propriedade
O tempo, em segundos, um controlo do utilizador deve permanecer na cache de saída.
Exemplos
O exemplo de código seguinte demonstra como o PartialCachingAttribute(Int32) construtor pode ser aplicado a um controlo de utilizador. O atributo indica que o controlo do utilizador pode ser armazenado em cache e especifica uma duração de cache de 20 segundos. Este exemplo de código faz parte de um exemplo maior fornecido para a PartialCachingAttribute classe.
// 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