Share via


CacheControlHeaderValue Class

Definition

Represents the Cache-Control HTTP header.

public ref class CacheControlHeaderValue
public class CacheControlHeaderValue
type CacheControlHeaderValue = class
Public Class CacheControlHeaderValue
Inheritance
CacheControlHeaderValue

Constructors

CacheControlHeaderValue()

Initializes a new instance of CacheControlHeaderValue.

Fields

MaxAgeString

A constant for the max-age cache-control directive.

MaxStaleString

A constant for the max-stale cache-control directive.

MinFreshString

A constant for the min-fresh cache-control directive.

MustRevalidateString

A constant for the must-revalidate cache-control directive.

NoCacheString

A constant for the no-cache cache-control directive.

NoStoreString

A constant for the no-store cache-control directive.

NoTransformString

A constant for the no-transform cache-control directive.

OnlyIfCachedString

A constant for the only-if-cached cache-control directive.

PrivateString

A constant for the private cache-control directive.

ProxyRevalidateString

A constant for the proxy-revalidate cache-control directive.

PublicString

A constant for the public cache-control directive.

SharedMaxAgeString

A constant for the s-maxage cache-control directive.

Properties

Extensions

Gets cache-extension tokens, each with an optional assigned value.

MaxAge

Gets or sets a value for the max-age directive.

max-age specifies the maximum amount of time the response is considered fresh.

MaxStale

Gets or sets a value that determines if the max-stale is included.

max-stale that the client will accept stale responses. The maximum tolerance for staleness is specified by MaxStaleLimit.

MaxStaleLimit

Gets or sets a value for the max-stale directive.

Indicates the maximum duration an HTTP client is willing to accept a response that has exceeded its expiration time.

MinFresh

Gets or sets a value for the min-fresh directive.

Indicates the freshness lifetime that an HTTP client is willing to accept a response.

MustRevalidate

Gets or sets a value that determines if the must-revalidate response directive is included.

Indicates that caches must revalidate the use of stale caches with the origin server before their use.

NoCache

Gets or sets a value for the no-cache directive.

Configuring no-cache indicates that the client must re-validate cached responses with the original server before using it.

NoCacheHeaders

Gets a collection of field names in the "no-cache" directive in a cache-control header field on an HTTP response.

NoStore

Gets or sets a value for the no-store directive.

Configuring no-store indicates that the response may not be stored in any cache.

NoTransform

Gets or sets a value for the no-transform request directive.

Forbids intermediate caches or proxies from editing the response payload.

OnlyIfCached

Gets or sets a value for the only-if-cached request directive.

Indicates that the client only wishes to obtain a stored response

Private

Gets or sets a value that determines if the private response directive is included.

Indicates that the response may not be stored by a shared cache.

PrivateHeaders

Gets a collection of field names in the "private" directive in a cache-control header field on an HTTP response.

ProxyRevalidate

Gets or sets a value that determines if the proxy-validate response directive is included.

Indicates that shared caches must revalidate the use of stale caches with the origin server before their use.

Public

Gets or sets a value that determines if the public response directive is included.

Indicates that the response may be stored by any cache.

SharedMaxAge

Gets or sets a value for the s-maxage directive.

Overrides max-age, but only for shared caches (such as proxies).

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

GetHashCode()

Serves as the default hash function.

Parse(String)
Parse(StringSegment)

Parses input as a CacheControlHeaderValue value.

ToString()

Returns a string that represents the current object.

TryParse(String, CacheControlHeaderValue)
TryParse(StringSegment, CacheControlHeaderValue)

Attempts to parse the specified input as a CacheControlHeaderValue.

Applies to