HttpRuntimeSection.SendCacheControlHeader 属性

定义

获取或设置一个值,该值指示 cache-control:private 标头是否作为 HTTP 响应的一部分来发送。Gets or sets a value that indicates whether the cache-control:private header is sent as part of the HTTP response.

public:
 property bool SendCacheControlHeader { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("sendCacheControlHeader", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public bool SendCacheControlHeader { get; set; }
member this.SendCacheControlHeader : bool with get, set
Public Property SendCacheControlHeader As Boolean

属性值

true如果要发送缓存控制: 专用标头, 则为;否则为falsetrue if the cache-control:private header is to be sent; otherwise, false. 默认值为 falseThe default value is false.

属性

注解

该类同时检查OutputCacheSection.SendCacheControlHeader属性和属性, 以确定是否发送 HTTP 响应中的cache-control:private标头。 HttpRuntimeSection.SendCacheControlHeader HttpResponseThe HttpResponse class checks both the HttpRuntimeSection.SendCacheControlHeader property and the OutputCacheSection.SendCacheControlHeader property to determine whether to send the cache-control:private header in the HTTP response. 如果任一属性设置为false, 则不会发送标头。If either property is set to false, the header will not be sent. 当缓存控制标头设置为private时, 客户端将不会缓存共享缓存中的响应。When the cache-control header is set to private, then the client will not cache the response in a shared cache.

提供对HttpRuntimeSectionSendCacheControlHeader中的属性的支持, 以便与旧应用程序兼容; 在 .NET Framework 版本2.0 中, 此属性已过时。Support for the SendCacheControlHeader property in the HttpRuntimeSection class is provided for compatibility with legacy applications; this property is obsolete in the .NET Framework version 2.0. 有关更多信息,请参见 OutputCacheSection 类。For more information, see the OutputCacheSection class.

适用于