OutputCacheProfile.Duration Eigenschap

Definitie

Hiermee wordt de tijdsduur opgehaald of ingesteld gedurende welke de pagina of het besturingselement in de cache wordt opgeslagen.

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

Waarde van eigenschap

De tijdsduur in seconden.

Kenmerken

Voorbeelden

In het volgende codevoorbeeld ziet u hoe u de Duration eigenschap gebruikt.


// 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

Opmerkingen

De Duration geeft de tijd in seconden aan waarop het pagina- of gebruikersbeheer in de cache is opgeslagen. Als u deze eigenschap instelt, wordt een verloopbeleid ingesteld voor HTTP-antwoorden van de pagina of het besturingselement waarop deze van toepassing is en wordt de cache van de uitvoer automatisch veroorzaakt.

Note

De Duration moet worden gedefinieerd in het profiel of de @ OutputCache instructie van een pagina met behulp van het profiel.

Van toepassing op

Zie ook