Early Preview

This is currently very much a preview. Please feel free to try things out, but don't be upset if anything is not yet working. Feedback is welcome over on our GitHub Dicussions page.

class System.​Net.​Http.​Headers.​CacheControlHeaderValue

Assembly: System.Net.Http

Inheritance: object → CacheControlHeaderValue

Implemented Interfaces

Represents the value of the Cache-Control header.

Properties

Cache-extension tokens, each with an optional assigned value.
public TimeSpan?
MaxAge
The maximum age, specified in seconds, that the HTTP client is willing to accept a response.
public bool
MaxStale
Whether an HTTP client is willing to accept a response that has exceeded its expiration time.
public TimeSpan?
MaxStaleLimit
The maximum time, in seconds, an HTTP client is willing to accept a response that has exceeded its expiration time.
public TimeSpan?
MinFresh
The freshness lifetime, in seconds, that an HTTP client is willing to accept a response.
public bool
MustRevalidate
Whether the origin server require revalidation of a cache entry on any subsequent use when the cache entry becomes stale.
public bool
NoCache
Whether an HTTP client is willing to accept a cached response.
NoCacheHeaders
A collection of fieldnames in the "no-cache" directive in a cache-control header field on an HTTP response.
public bool
NoStore
Whether a cache must not store any part of either the HTTP request message or any response.
public bool
NoTransform
Whether a cache or proxy must not change any aspect of the entity-body.
public bool
OnlyIfCached
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.
public bool
Private
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
A collection fieldnames in the "private" directive in a cache-control header field on an HTTP response.
public bool
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 bool
Public
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.
public TimeSpan?
SharedMaxAge
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.

Methods

public bool
Equals​(object obj)
Determines whether the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Net.Http.Headers.CacheControlHeaderValue" /> object.
Returns <see langword="true" /> if the specified <see cref="T:System.Object" /> is equal to the current object; otherwise, <see langword="false" /> .
obj The object to compare with the current object.
public int
GetHashCode​()
Serves as a hash function for a <see cref="T:System.Net.Http.Headers.CacheControlHeaderValue" /> object.
Returns A hash code for the current object.
public static CacheControlHeaderValue
Parse​(string input)
Converts a string to an <see cref="T:System.Net.Http.Headers.CacheControlHeaderValue" /> instance.
Returns A <see cref="T:System.Net.Http.Headers.CacheControlHeaderValue" /> instance.
input A string that represents cache-control header value information.
public string
ToString​()
Returns a string that represents the current <see cref="T:System.Net.Http.Headers.CacheControlHeaderValue" /> object.
Returns A string that represents the current object.
public static bool
TryParse​(string input, CacheControlHeaderValue& parsedValue)
protected void
Finalize​()
Inherited from object
public Type
GetType​()
Inherited from object
protected object
MemberwiseClone​()
Inherited from object