OutputCacheProfile.NoStore 属性
定义
获取或设置一个值,该值指示是否启用辅助存储。Gets or sets a value indicating whether secondary storage is enabled.
public:
property bool NoStore { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("noStore", DefaultValue=Mono.Cecil.CustomAttributeArgument)]
public bool NoStore { get; set; }
[<System.Configuration.ConfigurationProperty("noStore", DefaultValue=Mono.Cecil.CustomAttributeArgument)>]
member this.NoStore : bool with get, set
Public Property NoStore As Boolean
属性值
如果启用次要存储,则为 true;否则为 false。true if secondary storage is enabled; otherwise, false. 默认值是 false。The default value is false.
- 属性
示例
下面的代码示例说明如何使用 NoStore 属性。The following code example shows how to use the NoStore property.
// Get the current NoStore.
Boolean noStoreValue =
outputCacheProfile.NoStore;
// Set the NoStore.
outputCacheProfile.NoStore = false;
' Get the current NoStore.
Dim noStoreValue As [Boolean] = _
outputCacheProfile.NoStore
' Set the NoStore property.
outputCacheProfile.NoStore = False
注解
OutputCacheProfile.NoStore将属性设置为发出响应的页面,该 true 响应在其标头中指定以防止敏感信息的辅助存储。The page that has the OutputCacheProfile.NoStore property set to true issues a response specifying in its header to prevent secondary storage of sensitive information.
将此特性设置为 true 等效于在 HttpCachePolicy.SetNoStore Web 请求过程中调用方法。Setting this attribute to true is equivalent to invoking the HttpCachePolicy.SetNoStore method during a Web request.