CacheControlHeaderValue 类
定义
表示 Cache-Control 标头的值。Represents the value of the Cache-Control header.
public ref class CacheControlHeaderValue
public ref class CacheControlHeaderValue : ICloneable
public class CacheControlHeaderValue
public class CacheControlHeaderValue : ICloneable
type CacheControlHeaderValue = class
type CacheControlHeaderValue = class
interface ICloneable
Public Class CacheControlHeaderValue
Public Class CacheControlHeaderValue
Implements ICloneable
- 继承
-
CacheControlHeaderValue
- 实现
构造函数
| CacheControlHeaderValue() |
初始化 CacheControlHeaderValue 类的新实例。Initializes a new instance of the CacheControlHeaderValue class. |
属性
| Extensions |
Cache-extension 标记,每个标记都有一个可选分配值。Cache-extension tokens, each with an optional assigned value. |
| MaxAge |
HTTP 客户端愿意接受响应的最长时间(秒)。The maximum age, specified in seconds, that the HTTP client is willing to accept a response. |
| MaxStale |
是否一个 HTTP 客户端愿意接受一个已超出其过期时间的响应。Whether an HTTP client is willing to accept a response that has exceeded its expiration time. |
| MaxStaleLimit |
HTTP 客户端愿意接受已超出其过期时间的响应的最大时间值(以秒为单位)。The maximum time, in seconds, an HTTP client is willing to accept a response that has exceeded its expiration time. |
| MinFresh |
HTTP 客户端愿意接受响应的新鲜度时长(以秒为单位)。The freshness lifetime, in seconds, that an HTTP client is willing to accept a response. |
| MustRevalidate |
当缓存条目变得陈旧时,源服务器是否需要对任何后续使用的缓存条目进行重新验证。Whether the origin server require revalidation of a cache entry on any subsequent use when the cache entry becomes stale. |
| NoCache |
HTTP 客户端是否愿意接受缓存的响应。Whether an HTTP client is willing to accept a cached response. |
| NoCacheHeaders |
HTTP 响应上一个缓存控制标头字段中“no-cache”指令内的字段名的集合。A collection of fieldnames in the "no-cache" directive in a cache-control header field on an HTTP response. |
| NoStore |
缓存是否不得存储 HTTP 请求消息或任何响应的任何部分。Whether a cache must not store any part of either the HTTP request message or any response. |
| NoTransform |
缓存或代理是否不能更改实体正文的任何方面。Whether a cache or proxy must not change any aspect of the entity-body. |
| OnlyIfCached |
缓存是否应使用与该 HTTP 请求的其他约束一致的已缓存条目进行响应或使用 504(网关超时)状态进行响应。Whether a cache should either respond using a cached entry that is consistent with the other constraints of the HTTP request, or respond with a 504 (Gateway Timeout) status. |
| Private |
是否全部或部分 HTTP 响应消息用于单个用户,且不能由共享缓存进行缓存。Whether all or part of the HTTP response message is intended for a single user and must not be cached by a shared cache. |
| PrivateHeaders |
“private”指令中的集合字段名,其位于 HTTP 响应的缓存控制标头字段中。A collection fieldnames in the "private" directive in a cache-control header field on an HTTP response. |
| ProxyRevalidate |
当缓存条目针对于共享用户代理缓存变得陈旧时,源服务器是否需要对任何后续使用的缓存条目进行重新验证。Whether the origin server require revalidation of a cache entry on any subsequent use when the cache entry becomes stale for shared user agent caches. |
| Public |
是否一个 HTTP 响应可由任何缓存进行缓存,即使该响应通常为不可缓存或只能在非共享缓存中缓存。Whether an HTTP response may be cached by any cache, even if it would normally be non-cacheable or cacheable only within a non- shared cache. |
| SharedMaxAge |
HTTP 响应中共享的最长使用期限(以秒为单位),该响应为一个共享缓存重写缓存控制标头或 Expires 标头中的 "max-age" 指令。The shared maximum age, specified in seconds, in an HTTP response that overrides the "max-age" directive in a cache-control header or an Expires header for a shared cache. |
方法
| Equals(Object) |
确定指定的 Object 是否等于当前的 CacheControlHeaderValue 对象。Determines whether the specified Object is equal to the current CacheControlHeaderValue object. |
| GetHashCode() |
充当 CacheControlHeaderValue 对象的哈希函数。Serves as a hash function for a CacheControlHeaderValue object. |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| Parse(String) |
将字符串转换为 CacheControlHeaderValue 实例。Converts a string to an CacheControlHeaderValue instance. |
| ToString() |
返回表示当前 CacheControlHeaderValue 对象的字符串。Returns a string that represents the current CacheControlHeaderValue object. |
| TryParse(String, CacheControlHeaderValue) |
确定一个字符串是否为有效的 CacheControlHeaderValue 信息。Determines whether a string is valid CacheControlHeaderValue information. |
显式接口实现
| ICloneable.Clone() |
创建作为当前 CacheControlHeaderValue 实例副本的新对象。Creates a new object that is a copy of the current CacheControlHeaderValue instance. |