OutputCacheParameters 类

定义

封装 ASP.NET 根据 @ OutputCache 页指令分析的输出缓存初始化设置。Encapsulates the output cache initialization settings parsed from an @ OutputCache page directive by ASP.NET. 此类不能被继承。This class cannot be inherited.

public ref class OutputCacheParameters sealed
public sealed class OutputCacheParameters
type OutputCacheParameters = class
Public NotInheritable Class OutputCacheParameters
继承
OutputCacheParameters

注解

OutputCacheParameters类不由 ASP.NET 页面或控件开发人员使用。The OutputCacheParameters class is not used by ASP.NET page or control developers. 它提供一种数据结构, 用于存储由 ASP.NET 页和控件分析器 (如PageParserTemplateControlParser) 从@ OutputCache页指令分析的缓存设置。It provides a data structure used to store cache settings parsed from an @ OutputCache page directive by ASP.NET page and control parsers such as PageParser and TemplateControlParser. OutputCacheParameters 对象Page.InitOutputCache与方法一起使用, 以便在运行时初始化页面及其内容的输出缓存。The OutputCacheParameters object is used with the Page.InitOutputCache method to initialize the output cache for a page and its contents at run time.

构造函数

OutputCacheParameters()

初始化 OutputCacheParameters 类的新实例。Initializes a new instance of the OutputCacheParameters class.

属性

CacheProfile

获取或设置 OutputCacheProfile 名称,该名称与输出缓存项的设置关联。Gets or sets an OutputCacheProfile name that is associated with the settings of the output cache entry.

Duration

获取或设置缓存项要保留在输出缓存中的时间。Gets or sets the amount of time that a cache entry is to remain in the output cache.

Enabled

获取或设置一个值,该值指示是否对当前内容启用了输出缓存。Gets or sets a value indicating whether output caching is enabled for the current content.

Location

获取或设置一个值,该值确定缓存项的位置。Gets or sets a value that determines the location of the cache entry.

NoStore

获取或设置一个值,该值确定是否设置了 HTTP Cache-Control: no-store 指令。Gets or sets a value that determines whether the HTTP Cache-Control: no-store directive is set.

SqlDependency

获取或设置缓存项依赖的一组数据库和表名称对。Gets or sets a set of database and table name pairs that the cache entry depends on.

VaryByContentEncoding

获取或设置用于改变缓存项的一组逗号分隔的字符集(内容编码)。Gets or sets a comma-delimited set of character sets (content encodings) used to vary the cache entry.

VaryByControl

获取或设置一组分号分隔的控件标识符,这些标识符包含在当前页或用户控件内,用于改变当前缓存项。Gets or sets a semicolon-delimited set of control identifiers contained within the current page or user control used to vary the current cache entry.

VaryByCustom

获取输出缓存用来改变缓存项的自定义字符串列表。Gets a list of custom strings that the output cache uses to vary the cache entry.

VaryByHeader

获取或设置用于改变缓存项的一组逗号分隔的标头名称。Gets or sets a comma-delimited set of header names used to vary the cache entry. 标头名称标识与请求关联的 HTTP 标头。The header names identify HTTP headers associated with the request.

VaryByParam

获取查询字符串或窗体 POST 参数的分号分隔列表,该列表由输出缓存用来改变缓存项。Gets a semicolon-delimited list of query string or form POST parameters that the output cache uses to vary the cache entry.

方法

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅