SystemWebCachingSectionGroup.OutputCacheSettings Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Yapılandırmanın outputCacheSettings içinde 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 nesnesi.
- Öznitelikler
Örnekler
Aşağıdaki kod örneğinde, nesnenin OutputCacheSettingsSection var olan bir Web uygulamasının yapılandırma dosyasından nasıl alın aldığı gösterilmektedir.
// 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 önbellek boyutu üst sınırını belirtir.
ASP.NET, @ OutputCache yönergesinin özniteliklerini kullanarak ve HttpCachePolicy sınıfının özelliklerini ve yöntemlerini kullanarak sayfa yanıtının birden çok sürümünü bildirimli olarak önbelleğe almanızı sağlar.
Veya OutputCacheSettingsSection türünü kullanarak OutputCacheProfile uygulamayı yapılandırarak aynı sonuçları elde edebilirsiniz.