Editare

Partajați prin


OutputCacheProfile.NoStore Property

Definition

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=false)]
public bool NoStore { get; set; }
[<System.Configuration.ConfigurationProperty("noStore", DefaultValue=false)>]
member this.NoStore : bool with get, set
Public Property NoStore As Boolean

Property Value

true if secondary storage is enabled; otherwise, false. The default value is false.

Attributes

Examples

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

Remarks

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.

Setting this attribute to true is equivalent to invoking the HttpCachePolicy.SetNoStore method during a Web request.

Applies to

See also