Breyta

Deila með


HttpCachePolicy Class

Definition

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
Inheritance
HttpCachePolicy

Remarks

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.

Properties

UtcTimestampCreated

Gets or sets the timestamp in Coordinated Universal Time (UTC) for the HttpCachePolicy.

VaryByContentEncodings

Gets the list of Content-Encoding headers that will be used to vary the output cache.

VaryByHeaders

Gets the list of all HTTP headers that will be used to vary cache output.

VaryByParams

Gets the list of parameters received by an HTTP GET or HTTP POST that affect caching.

Methods

AddValidationCallback(HttpCacheValidateHandler, Object)

Registers a validation callback for the current response.

AppendCacheExtension(String)

Appends the specified text to the Cache-Control HTTP header.

Equals(Object)

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

(Inherited from Object)
GetCacheability()

Gets the cache-control directive.

GetCacheExtensions()

Gets the cache extensions.

GetETag()

Gets the ETag.

GetETagFromFileDependencies()

Gets the status indicating whether the ETag header has been set based on the timestamps of the file dependencies of the handler.

GetExpires()

Gets the expire header.

GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetIgnoreRangeRequests()

Gets the status of ignore range requests.

GetLastModifiedFromFileDependencies()

Gets the status of the Last-Modified header set to base on the timestamps of the file dependencies of the handler.

GetMaxAge()

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()

Gets the status of the HTTP No-Transform Directive.

GetOmitVaryStar()

Gets the status of the vary:* header.

GetProxyMaxAge()

Gets the HTTP Cache-Control: Proxy Max Age.

GetRevalidation()

Gets the Cache-Control: header to reflect either the must-revalidate or proxy-revalidate directives.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
GetUtcLastModified()

Gets the value of the Last-Modified HTTP header in Coordinated Universal Time (UTC).

GetVaryByCustom()

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()

Gets a value which specifies whether the HTTP cache has been modified.

IsValidUntilExpires()

Gets a value which specifies whether the ASP.NET cache should ignore HTTP Cache-Control headers sent by the client that invalidate the cache.

MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetAllowResponseInBrowserHistory(Boolean)

Makes the response is available in the client browser History cache, regardless of the HttpCacheability setting made on the server, when the allow parameter is true.

SetCacheability(HttpCacheability, String)

Sets the Cache-Control header to one of the values of HttpCacheability and appends an extension to the directive.

SetCacheability(HttpCacheability)

Sets the Cache-Control header to one of the values of HttpCacheability.

SetETag(String)

Sets the ETag HTTP header to the specified string.

SetETagFromFileDependencies()

Sets the ETag HTTP header based on the time stamps of the handler's file dependencies.

SetExpires(DateTime)

Sets the Expires HTTP header to an absolute date and time.

SetLastModified(DateTime)

Sets the Last-Modified HTTP header to the DateTime value supplied.

SetLastModifiedFromFileDependencies()

Sets the Last-Modified HTTP header based on the time stamps of the handler's file dependencies.

SetMaxAge(TimeSpan)

Sets the Cache-Control: max-age HTTP header based on the specified time span.

SetNoServerCaching()

Stops all origin-server caching for the current response.

SetNoStore()

Sets the Cache-Control: no-store HTTP header.

SetNoTransforms()

Sets the Cache-Control: no-transform HTTP header.

SetOmitVaryStar(Boolean)

Specifies whether the response should contain the vary:* header when varying by parameters.

SetProxyMaxAge(TimeSpan)

Sets the Cache-Control: s-maxage HTTP header based on the specified time span.

SetRevalidation(HttpCacheRevalidation)

Sets the Cache-Control HTTP header to either the must-revalidate or the proxy-revalidate directives based on the supplied enumeration value.

SetSlidingExpiration(Boolean)

Sets cache expiration to from absolute to sliding.

SetValidUntilExpires(Boolean)

Specifies whether the ASP.NET cache should ignore HTTP Cache-Control headers sent by the client that invalidate the cache.

SetVaryByCustom(String)

Specifies a custom text string to vary cached output responses by.

ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to