SystemWebCachingSectionGroup.OutputCacheSettings Eigenschap
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Hiermee wordt de outputCacheSettings sectie in de configuratie opgeslagen.
public:
property System::Web::Configuration::OutputCacheSettingsSection ^ OutputCacheSettings { System::Web::Configuration::OutputCacheSettingsSection ^ get(); };
[System.Configuration.ConfigurationProperty("outputCacheSettings")]
public System.Web.Configuration.OutputCacheSettingsSection OutputCacheSettings { get; }
[<System.Configuration.ConfigurationProperty("outputCacheSettings")>]
member this.OutputCacheSettings : System.Web.Configuration.OutputCacheSettingsSection
Public ReadOnly Property OutputCacheSettings As OutputCacheSettingsSection
Waarde van eigenschap
Het OutputCacheSettingsSection-object.
- Kenmerken
Voorbeelden
In het volgende codevoorbeeld ziet u hoe u het OutputCacheSettingsSection object ophaalt uit het configuratiebestand van een bestaande webtoepassing.
// Get the .<outputCacheSettings> section
OutputCacheSettingsSection outputCacheSettings=
cachingSectionGroup.OutputCacheSettings;
// Display the number of existing
// profiles.
int profilesCount =
outputCacheSettings.OutputCacheProfiles.Count;
msg = String.Format(
"Number of profiles: {0}\n",
profilesCount.ToString());
Console.Write(msg);
' Get the .<outputCacheSettings> section
Dim outputCacheSettings _
As OutputCacheSettingsSection = _
cachingSectionGroup.OutputCacheSettings
' Display the number of existing
' profiles.
Dim profilesCount As Integer = _
outputCacheSettings.OutputCacheProfiles.Count
msg = String.Format( _
"Number of profiles: {0}" + _
ControlChars.Lf, profilesCount.ToString())
Console.Write(msg)
Opmerkingen
Het OutputCacheSettingsSection object verwijst naar de outputCacheSettings sectie van het configuratiebestand.
Met de instellingen voor de uitvoercache kunt u permanente uitvoercache op basis van schijven in- of uitschakelen, de locatie definiƫren voor het persistent maken van de gegevens die in de cache moeten worden opgeslagen en de maximale grootte van de cache per toepassing opgeven.
ASP.NET kunt u meerdere versies van een paginaantwoord declaratief opslaan met behulp van kenmerken van de @ OutputCache instructie en programmatisch met behulp van de eigenschappen en methoden van de klasse HttpCachePolicy.
U kunt dezelfde resultaten behalen door de toepassing te configureren met behulp van het OutputCacheSettingsSection of het OutputCacheProfile type.