System.Web.HttpCachePolicy Members

The members of System.Web.HttpCachePolicy are listed below.

See Also: Inherited members from System.Object

Public Properties

[read-only]
VaryByContentEncodingsHttpCacheVaryByContentEncodings.

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

[read-only]
VaryByHeadersHttpCacheVaryByHeaders.

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

[read-only]
VaryByParamsHttpCacheVaryByParams.

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

Public Methods

AddValidationCallback(HttpCacheValidateHandler, object)

Registers a validation callback for the current response.

AppendCacheExtension(string)

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

SetAllowResponseInBrowserHistory(bool)

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

SetCacheability(HttpCacheability)

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

SetCacheability(HttpCacheability, string)

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

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

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

Sets cache expiration to from absolute to sliding.

SetValidUntilExpires(bool)

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.