OutputCacheSection.SendCacheControlHeader 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取或设置一个值,该值指示标头是否 cache-control:private 默认由输出缓存模块发送。
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。 默认值为 true。
- 属性
示例
下面的代码示例演示如何使用该 SendCacheControlHeader 属性。
// 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
注解
适用于 SendCacheControlHeader 未指定输出缓存的内容。 设置为
注释
此设置允许默认情况下在客户端上缓存内容。