Bagikan melalui


HttpRuntimeSection.EnableKernelOutputCache Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah penembolokan output diaktifkan.

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

Nilai Properti

true jika penembolokan output diaktifkan; jika tidak, false. Nilai defaultnya adalah true.

Atribut

Contoh

Contoh berikut menunjukkan cara menggunakan EnableKernelOutputCache properti .

// Get the current EnableKernelOutputCache property value.
Response.Write("EnableKernelOutputCache: " +
  configSection.EnableKernelOutputCache + "<br>");

// Set the EnableKernelOutputCache property to true.
configSection.EnableKernelOutputCache = true;
' Get the current EnableKernelOutputCache property value.
Response.Write("EnableKernelOutputCache: " & _
  configSection.EnableKernelOutputCache & "<br>")

' Set the EnableKernelOutputCache property to true.
configSection.EnableKernelOutputCache = True

Keterangan

Untuk men-cache respons, kriteria berikut perlu dipenuhi:

  • Penembolokan harus diaktifkan secara eksplisit oleh arahan halaman atau oleh API penembolokan.

  • Penembolokan harus memiliki kebijakan kedaluwarsa sehingga kernel tahu kapan harus membuangnya.

  • Penembolokan tidak dapat memiliki header atau parameter variabel apa pun.

  • Permintaan tidak boleh memerlukan autentikasi apa pun.

Catatan

Properti ini hanya relevan ketika Internet Information Services (IIS) versi 6.0 atau yang lebih baru diinstal.

Berlaku untuk

Lihat juga