HttpCachePolicy Class
TOC
Collapse the table of content
Expand the table of content

HttpCachePolicy Class

 

Contains methods for setting cache-specific HTTP headers and for controlling the ASP.NET page output cache.

Namespace:   System.Web
Assembly:  System.Web (in System.Web.dll)

System.Object
  System.Web.HttpCachePolicy

public sealed class HttpCachePolicy

NameDescription
System_CAPS_pubpropertyVaryByContentEncodings

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

System_CAPS_pubpropertyVaryByHeaders

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

System_CAPS_pubpropertyVaryByParams

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

NameDescription
System_CAPS_pubmethodAddValidationCallback(HttpCacheValidateHandler, Object)

Registers a validation callback for the current response.

System_CAPS_pubmethodAppendCacheExtension(String)

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

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodSetAllowResponseInBrowserHistory(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.

System_CAPS_pubmethodSetCacheability(HttpCacheability)

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

System_CAPS_pubmethodSetCacheability(HttpCacheability, String)

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

System_CAPS_pubmethodSetETag(String)

Sets the ETag HTTP header to the specified string.

System_CAPS_pubmethodSetETagFromFileDependencies()

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

System_CAPS_pubmethodSetExpires(DateTime)

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

System_CAPS_pubmethodSetLastModified(DateTime)

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

System_CAPS_pubmethodSetLastModifiedFromFileDependencies()

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

System_CAPS_pubmethodSetMaxAge(TimeSpan)

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

System_CAPS_pubmethodSetNoServerCaching()

Stops all origin-server caching for the current response.

System_CAPS_pubmethodSetNoStore()

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

System_CAPS_pubmethodSetNoTransforms()

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

System_CAPS_pubmethodSetOmitVaryStar(Boolean)

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

System_CAPS_pubmethodSetProxyMaxAge(TimeSpan)

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

System_CAPS_pubmethodSetRevalidation(HttpCacheRevalidation)

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

System_CAPS_pubmethodSetSlidingExpiration(Boolean)

Sets cache expiration to from absolute to sliding.

System_CAPS_pubmethodSetValidUntilExpires(Boolean)

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

System_CAPS_pubmethodSetVaryByCustom(String)

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

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

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.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft