HttpCachePolicy 类
定义
包含可用于设置特定于缓存的 HTTP 标头以及用于控制 ASP.NET 页输出缓存的方法。Contains methods for setting cache-specific HTTP headers and for controlling the ASP.NET page output cache.
public ref class HttpCachePolicy sealed
public sealed class HttpCachePolicy
type HttpCachePolicy = class
Public NotInheritable Class HttpCachePolicy
- 继承
-
HttpCachePolicy
注解
有关 HTTP 标头和控制缓存的背景信息,请参阅 万维网联合会 (W3C) 网站上的 RFC 2616:超文本传输协议-HTTP/1.1。For background information about HTTP headers and controlling caching, see RFC 2616: Hypertext Transfer Protocol -- HTTP/1.1, available on the World Wide Web Consortium (W3C) Web site.
属性
| UtcTimestampCreated |
获取或设置 HttpCachePolicy 的协调世界时 (UTC) 中的时间戳。Gets or sets the timestamp in Coordinated Universal Time (UTC) for the HttpCachePolicy. |
| VaryByContentEncodings |
获取用于区分输出缓存的 |
| VaryByHeaders |
获取将用于改变缓存输出的所有 HTTP 标头的列表。Gets the list of all HTTP headers that will be used to vary cache output. |
| VaryByParams |
获取由影响缓存的 HTTP |
方法
| AddValidationCallback(HttpCacheValidateHandler, Object) |
注册当前响应的验证回调。Registers a validation callback for the current response. |
| AppendCacheExtension(String) |
指定将文本追加到 |
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetCacheability() |
获取 Cache-Control 指令。Gets the cache-control directive. |
| GetCacheExtensions() |
获取缓存扩展。Gets the cache extensions. |
| GetETag() |
获取 ETag。Gets the ETag. |
| GetETagFromFileDependencies() |
获取状态,此状态指示是否已基于处理程序的文件依赖项的时间戳设置了 |
| GetExpires() |
获取到期标头。Gets the expire header. |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetIgnoreRangeRequests() |
获取忽略范围请求的状态。Gets the status of ignore range requests. |
| GetLastModifiedFromFileDependencies() |
基于处理程序文件依赖项的时间戳,获取 Last-Modified 标头集的状态。Gets the status of the Last-Modified header set to base on the timestamps of the file dependencies of the handler. |
| GetMaxAge() |
获取 Cache-Control 最长时间。Gets the cache-control max age. |
| GetNoServerCaching() |
获取当前响应的服务器缓存状态。Gets the status of server caching for the current response. |
| GetNoStore() |
获取存储的状态。Gets the status of the store. |
| GetNoTransforms() |
获取 HTTP No-Transform 指令的状态。Gets the status of the HTTP No-Transform Directive. |
| GetOmitVaryStar() |
获取 |
| GetProxyMaxAge() |
获取 HTTP Cache-Control:最长代理时间。Gets the HTTP Cache-Control: Proxy Max Age. |
| GetRevalidation() |
获取 Cache-Control:用于反映 must-revalidate 或 proxy-revalidate 指令的标头。Gets the Cache-Control: header to reflect either the must-revalidate or proxy-revalidate directives. |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| GetUtcLastModified() |
以协调世界时 (UTC) 获取 |
| GetVaryByCustom() |
获取用于改变 HTTP 缓存的自定义字符串。Gets the custom string that is used to vary the HTTP caching. |
| HasSlidingExpiration() |
获取一个值,该值指定缓存是否具有可调过期策略。Gets a value which specifies whether the cache has a sliding expiration policy. |
| IsModified() |
获取一个值,该值指定 HTTP 缓存是否已被修改。Gets a value which specifies whether the HTTP cache has been modified. |
| IsValidUntilExpires() |
获取一个值,该值指定 ASP.NET 缓存是否应忽略客户端发送的使缓存失效的 HTTP |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| SetAllowResponseInBrowserHistory(Boolean) |
当 |
| SetCacheability(HttpCacheability) |
将 |
| SetCacheability(HttpCacheability, String) |
将 |
| SetETag(String) |
将 |
| SetETagFromFileDependencies() |
基于处理程序的文件依赖项的时间戳设置 |
| SetExpires(DateTime) |
将 |
| SetLastModified(DateTime) |
将 |
| SetLastModifiedFromFileDependencies() |
基于处理程序的文件依赖项的时间戳设置 |
| SetMaxAge(TimeSpan) |
基于指定的时间跨度设置 |
| SetNoServerCaching() |
停止针对当前响应的所有源服务器缓存。Stops all origin-server caching for the current response. |
| SetNoStore() |
设置 |
| SetNoTransforms() |
设置 |
| SetOmitVaryStar(Boolean) |
指定在按参数进行区分时,响应是否应该包含 |
| SetProxyMaxAge(TimeSpan) |
基于指定的时间跨度设置 |
| SetRevalidation(HttpCacheRevalidation) |
基于提供的枚举值,将 |
| SetSlidingExpiration(Boolean) |
将缓存过期从绝对时间设置为可调时间。Sets cache expiration to from absolute to sliding. |
| SetValidUntilExpires(Boolean) |
指定 ASP.NET 缓存是否应忽略客户端发送的使缓存失效的 HTTP |
| SetVaryByCustom(String) |
指定自定义文本字符串,它用于改变已缓存的输出响应。Specifies a custom text string to vary cached output responses by. |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |