OutputCacheSettingsSection.OutputCacheProfiles Egenskap

Definition

public:
 property System::Web::Configuration::OutputCacheProfileCollection ^ OutputCacheProfiles { System::Web::Configuration::OutputCacheProfileCollection ^ get(); };
[System.Configuration.ConfigurationProperty("outputCacheProfiles")]
public System.Web.Configuration.OutputCacheProfileCollection OutputCacheProfiles { get; }
[<System.Configuration.ConfigurationProperty("outputCacheProfiles")>]
member this.OutputCacheProfiles : System.Web.Configuration.OutputCacheProfileCollection
Public ReadOnly Property OutputCacheProfiles As OutputCacheProfileCollection

Egenskapsvärde

En OutputCacheProfileCollection av OutputCacheProfile objekt.

Attribut

Exempel

Följande kodexempel visar hur du använder egenskapen OutputCacheProfiles .

// Get the current OutputCacheProfiles property value.
OutputCacheProfileCollection outputCacheProfilesValue =
  outputCacheSettings.OutputCacheProfiles;
' Get the current OutputCacheProfiles property value.
  Dim outputCacheProfilesValue _
  As OutputCacheProfileCollection = _
  outputCacheSettings.OutputCacheProfiles

Kommentarer

Med OutputCacheProfiles egenskapen kan du programmatiskt komma åt elementet outputCacheProfiles i en konfigurationsfil. Du kan använda OutputCacheProfiles egenskapen för att ändra elementet outputCacheProfiles programmatiskt.

Avsnittet outputCacheProfiles innehåller OutputCacheProfile objekt som representerar cacheinställningar för utdata som kan användas av sidor i programmet. De här inställningarna kan tillämpas på en sida genom att ange CacheProfile attributet för @OutputCache-direktivet . Använd profilen för att styra cachelagringsattribut, till exempel beroenden, cacheplats och förfallotid för cache.

@OutputCache-direktivet kan åsidosätta alla inställningar som finns i en OutputCacheProfile förutom egenskapenEnabled. Detta är för att säkerställa att du kan aktivera eller inaktivera OutputCacheProfile utan att behöva ändra direktiven på alla sidor som kan ha åsidosatt det.

Gäller för

Se även