OutputCacheSection.SendCacheControlHeader Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan atau menetapkan nilai yang menunjukkan apakah cache-control:private header dikirim oleh modul cache output secara default.
public:
property bool SendCacheControlHeader { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("sendCacheControlHeader", DefaultValue=true)]
public bool SendCacheControlHeader { get; set; }
[<System.Configuration.ConfigurationProperty("sendCacheControlHeader", DefaultValue=true)>]
member this.SendCacheControlHeader : bool with get, set
Public Property SendCacheControlHeader As Boolean
Nilai Properti
true jika pengiriman cache-control:private header diaktifkan; jika tidak, false. Default adalah true.
- Atribut
Contoh
Contoh kode berikut menunjukkan cara menggunakan SendCacheControlHeader properti .
// Get the current SendCacheControlHeader.
Boolean sendCacheControlHeaderValue =
outputCacheSection.SendCacheControlHeader;
// Set the SendCacheControlHeader.
outputCacheSection.SendCacheControlHeader = false;
' Get the current SendCacheControlHeader.
Dim sendCacheControlHeaderValue As [Boolean] = _
outputCacheSection.SendCacheControlHeader
' Set the SendCacheControlHeader.
outputCacheSection.SendCacheControlHeader = False
Keterangan
SendCacheControlHeader berlaku untuk konten tanpa penembolokan output yang ditentukan. Ketika diatur ke false, cache-control:private header tidak dikirim secara default.
Catatan
Pengaturan ini memungkinkan konten di-cache pada klien secara default.