Aracılığıyla paylaş


SystemWebCachingSectionGroup.OutputCacheSettings Özellik

Tanım

Yapılandırmada outputCacheSettings yer alan bölümü alır.

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

Özellik Değeri

OutputCacheSettingsSection

OutputCacheSettingsSection nesnesi.

Öznitelikler

Örnekler

Aşağıdaki kod örneği, nesnenin OutputCacheSettingsSection var olan bir Web uygulamasının yapılandırma dosyasından nasıl alınacaklarını gösterir.


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

Açıklamalar

OutputCacheSettingsSection nesnesi yapılandırma dosyasının outputCacheSettings bölümüne başvurur.

Çıktı önbelleği ayarları disk tabanlı kalıcı çıkış önbelleğini etkinleştirir veya devre dışı bırakır, önbelleğe alınacak verileri kalıcı hale getirmek için konumu tanımlar ve uygulama başına önbelleğin en büyük boyutunu belirtir.

ASP.NET, yönergenin özniteliklerini kullanarak sayfa yanıtının birden çok sürümünü bildirimli olarak önbelleğe almanızı ve sınıfın @ OutputCache özelliklerini ve yöntemlerini program aracılığıyla önbelleğe HttpCachePolicy almanızı sağlar.

Veya OutputCacheProfile türünü kullanarak OutputCacheSettingsSection uygulamayı yapılandırarak aynı sonuçları elde edebilirsiniz.

Şunlara uygulanır

Ayrıca bkz.