This documentation is archived and is not being maintained.

HttpCachePolicy Methods

The methods of the HttpCachePolicy class are listed here. For a complete list of HttpCachePolicy class members, see the HttpCachePolicy Members topic.

Public Methods

public methodAddValidationCallback Registers a validation callback for the current response.
public methodAppendCacheExtension Appends the specified text to the Cache-Control HTTP header.
public methodEquals (inherited from Object) Overloaded. Determines whether two Object instances are equal.
public methodGetHashCode (inherited from Object) Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
public methodGetType (inherited from Object) Gets the Type of the current instance.
public methodSetAllowResponseInBrowserHistory When set to true, the response is available in the client browser History cache regardless of the HttpCacheability setting made on the server.
public methodSetCacheability Overloaded. Sets the Cache-Control HTTP header. The Cache-Control HTTP header controls how documents are to be cached on the network.
public methodSetETag Sets the ETag HTTP header to the specified string.
public methodSetETagFromFileDependencies Sets the ETag HTTP header based on the time stamps of the handler's file dependencies.
public methodSetExpires Sets the Expires HTTP header to an absolute date and time.
public methodSetLastModified Sets the Last-Modified HTTP header to the DateTime value supplied.
public methodSetLastModifiedFromFileDependencies Sets the Last-Modified HTTP header based on the time stamps of the handler's file dependencies.
public methodSetMaxAge Sets the Cache-Control: max-age HTTP header based on the specified time span.
public methodSetNoServerCaching Stops all origin-server caching for the current response.
public methodSetNoStore Sets the Cache-Control: no-store directive.
public methodSetNoTransforms Sets the CacheControl: no-transform directive.
public methodSetProxyMaxAge Sets the Cache-Control: s-maxage HTTP header based on the specified time span.
public methodSetRevalidation Sets the Cache-Control HTTP header to either the must-revalidate or the proxy-revalidate directives based on the supplied enumeration value.
public methodSetSlidingExpiration Sets cache expiration to sliding.
public methodSetValidUntilExpires Specifies whether the ASP.NET cache should ignore HTTP Cache-Control headers sent by the client that invalidate the cache.
public methodSetVaryByCustom Specifies a custom text string to vary cached output responses by.
public methodToString (inherited from Object) Returns a String that represents the current Object.

Protected Methods

protected methodFinalize (inherited from Object) Overridden. Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.

In C# and C++, finalizers are expressed using destructor syntax.

protected methodMemberwiseClone (inherited from Object) Creates a shallow copy of the current Object.

See Also

HttpCachePolicy Class | System.Web Namespace

Show: