Bagikan melalui


OutputCacheSection.EnableOutputCache Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah cache output diaktifkan.

public:
 property bool EnableOutputCache { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("enableOutputCache", DefaultValue=true)]
public bool EnableOutputCache { get; set; }
[<System.Configuration.ConfigurationProperty("enableOutputCache", DefaultValue=true)>]
member this.EnableOutputCache : bool with get, set
Public Property EnableOutputCache As Boolean

Nilai Properti

true jika cache output diaktifkan; jika tidak, false. Default adalah true.

Atribut

Contoh

Contoh kode berikut menunjukkan cara menggunakan EnableOutputCache properti .


// Get the current EnabledOutputCache.
Boolean enabledOutputCache = 
    outputCacheSection.EnableOutputCache;

// Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = false;
' Get the current EnabledOutputCache.
  Dim enabledOutputCache As [Boolean] = _
  outputCacheSection.EnableOutputCache

' Set the EnabledOutputCache.
outputCacheSection.EnableOutputCache = False

Keterangan

EnableFragmentCache Jika properti diatur ke false, tidak ada halaman yang di-cache di server, terlepas dari pengaturan di @ OutputCache direktif atau profil penembolokan yang digunakan oleh halaman. Untuk informasi lebih lanjut, lihat OutputCacheSettingsSection dan OutputCacheProfile.

Berlaku untuk

Lihat juga