HttpCachePolicyWrapper HttpCachePolicyWrapper HttpCachePolicyWrapper HttpCachePolicyWrapper Class

Definition

Encapsulates the HTTP intrinsic object that contains methods for setting cache-specific HTTP headers and for controlling the ASP.NET page output cache.

public ref class HttpCachePolicyWrapper : System::Web::HttpCachePolicyBase
public class HttpCachePolicyWrapper : System.Web.HttpCachePolicyBase
type HttpCachePolicyWrapper = class
    inherit HttpCachePolicyBase
Public Class HttpCachePolicyWrapper
Inherits HttpCachePolicyBase
Inheritance
HttpCachePolicyWrapperHttpCachePolicyWrapperHttpCachePolicyWrapperHttpCachePolicyWrapper

Remarks

The HttpCachePolicyWrapper class derives from the HttpCachePolicyBase class and serves as a wrapper for the HttpCachePolicy class. This class exposes the functionality of the HttpCachePolicy class while also exposing the HttpCachePolicyBase type. The HttpCachePolicyBase class enables you to replace the original implementation of the HttpCachePolicy class in your application with a custom implementation, such as when you perform unit testing outside the ASP.NET pipeline.

Constructors

HttpCachePolicyWrapper(HttpCachePolicy) HttpCachePolicyWrapper(HttpCachePolicy) HttpCachePolicyWrapper(HttpCachePolicy) HttpCachePolicyWrapper(HttpCachePolicy)

Initializes a new instance of the HttpCachePolicyWrapper class.

Properties

VaryByContentEncodings VaryByContentEncodings VaryByContentEncodings VaryByContentEncodings

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

VaryByHeaders VaryByHeaders VaryByHeaders VaryByHeaders

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

VaryByParams VaryByParams VaryByParams VaryByParams

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

Methods

AddValidationCallback(HttpCacheValidateHandler, Object) AddValidationCallback(HttpCacheValidateHandler, Object) AddValidationCallback(HttpCacheValidateHandler, Object) AddValidationCallback(HttpCacheValidateHandler, Object)

Registers a validation callback for the current response.

AppendCacheExtension(String) AppendCacheExtension(String) AppendCacheExtension(String) AppendCacheExtension(String)

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

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

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

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
SetAllowResponseInBrowserHistory(Boolean) SetAllowResponseInBrowserHistory(Boolean) SetAllowResponseInBrowserHistory(Boolean) SetAllowResponseInBrowserHistory(Boolean)

Makes the response available in the browser history cache, regardless of the HttpCacheability setting made on the server.

SetCacheability(HttpCacheability) SetCacheability(HttpCacheability) SetCacheability(HttpCacheability) SetCacheability(HttpCacheability)

Sets the Cache-Control header to the specified HttpCacheability value.

SetCacheability(HttpCacheability, String) SetCacheability(HttpCacheability, String) SetCacheability(HttpCacheability, String) SetCacheability(HttpCacheability, String)

Sets the Cache-Control header to the specified HttpCacheability value and appends an extension to the directive.

SetETag(String) SetETag(String) SetETag(String) SetETag(String)

Sets the ETag HTTP header to the specified string.

SetETagFromFileDependencies() SetETagFromFileDependencies() SetETagFromFileDependencies() SetETagFromFileDependencies()

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

SetExpires(DateTime) SetExpires(DateTime) SetExpires(DateTime) SetExpires(DateTime)

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

SetLastModified(DateTime) SetLastModified(DateTime) SetLastModified(DateTime) SetLastModified(DateTime)

Sets the Last-Modified HTTP header to the specified date and time.

SetLastModifiedFromFileDependencies() SetLastModifiedFromFileDependencies() SetLastModifiedFromFileDependencies() SetLastModifiedFromFileDependencies()

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

SetMaxAge(TimeSpan) SetMaxAge(TimeSpan) SetMaxAge(TimeSpan) SetMaxAge(TimeSpan)

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

SetNoServerCaching() SetNoServerCaching() SetNoServerCaching() SetNoServerCaching()

Stops all origin-server caching for the current response.

SetNoStore() SetNoStore() SetNoStore() SetNoStore()

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

SetNoTransforms() SetNoTransforms() SetNoTransforms() SetNoTransforms()

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

SetOmitVaryStar(Boolean) SetOmitVaryStar(Boolean) SetOmitVaryStar(Boolean) SetOmitVaryStar(Boolean)

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

SetProxyMaxAge(TimeSpan) SetProxyMaxAge(TimeSpan) SetProxyMaxAge(TimeSpan) SetProxyMaxAge(TimeSpan)

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

SetRevalidation(HttpCacheRevalidation) SetRevalidation(HttpCacheRevalidation) SetRevalidation(HttpCacheRevalidation) SetRevalidation(HttpCacheRevalidation)

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

SetSlidingExpiration(Boolean) SetSlidingExpiration(Boolean) SetSlidingExpiration(Boolean) SetSlidingExpiration(Boolean)

Sets cache expiration to absolute or sliding.

SetValidUntilExpires(Boolean) SetValidUntilExpires(Boolean) SetValidUntilExpires(Boolean) SetValidUntilExpires(Boolean)

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

SetVaryByCustom(String) SetVaryByCustom(String) SetVaryByCustom(String) SetVaryByCustom(String)

Specifies a text string to vary cached output responses by.

ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Applies to