HttpRuntimeSection.SendCacheControlHeader 属性

定义

获取或设置一个值,该值指示标头是否 cache-control:private 作为 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

属性值

true cache-control:private如果要发送标头,则为 :否则为 false。 默认值为 false

属性

注解

HttpResponse 类检查 HttpRuntimeSection.SendCacheControlHeader 属性和 OutputCacheSection.SendCacheControlHeader 属性,以确定是否在 HTTP 响应中发送 cache-control:private 标头。 如果任一属性设置为 false,则不会发送标头。 当缓存控制标头设置为 private时,客户端将不会在共享缓存中缓存响应。

SendCacheControlHeader提供对类中的HttpRuntimeSection属性的支持,以便与旧版应用程序兼容;此属性在 .NET Framework 版本 2.0 中已过时。 有关更多信息,请参见 OutputCacheSection 类。

适用于