Bagikan melalui


HttpRuntimeSection.SendCacheControlHeader Properti

Definisi

Mendapatkan atau menetapkan nilai yang menunjukkan apakah cache-control:private header dikirim sebagai bagian dari respons HTTP.

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 cache-control:private jika header akan dikirim; jika tidak, false. Nilai defaultnya adalah false.

Atribut

Keterangan

Kelas HttpResponse memeriksa HttpRuntimeSection.SendCacheControlHeader properti dan OutputCacheSection.SendCacheControlHeader properti untuk menentukan apakah akan mengirim cache-control:private header dalam respons HTTP. Jika salah satu properti diatur ke false, header tidak akan dikirim. Ketika header kontrol cache diatur ke private, maka klien tidak akan menyimpan respons dalam cache bersama.

Dukungan untuk SendCacheControlHeader properti di HttpRuntimeSection kelas disediakan untuk kompatibilitas dengan aplikasi warisan; properti ini usang dalam .NET Framework versi 2.0. Untuk informasi selengkapnya, lihat kelas OutputCacheSection.

Berlaku untuk