HttpCachePolicyBase HttpCachePolicyBase HttpCachePolicyBase HttpCachePolicyBase Class

Definition

Serves as the base class for classes that contain methods for setting cache-specific HTTP headers and for controlling the ASP.NET page output cache.

public ref class HttpCachePolicyBase abstract
public abstract class HttpCachePolicyBase
type HttpCachePolicyBase = class
Public MustInherit Class HttpCachePolicyBase
Inheritance
HttpCachePolicyBaseHttpCachePolicyBaseHttpCachePolicyBaseHttpCachePolicyBase
Derived

Remarks

The HttpCachePolicyBase class is an abstract class that contains the same members as the HttpCachePolicy class. The HttpCachePolicyBase class lets you create derived classes that are like the HttpCachePolicy class, but that you can customize and that work outside the ASP.NET pipeline. When you perform unit testing, you typically use a derived class to implement members with customized behavior that fulfills the scenario you are testing.

The HttpCachePolicyWrapper class derives from the HttpCachePolicyBase class. The HttpCachePolicyWrapper class serves as a wrapper for the HttpCachePolicy class. At run time, you typically use an instance of the HttpCachePolicyWrapper class to call members of the HttpCachePolicy object.

Constructors

HttpCachePolicyBase() HttpCachePolicyBase() HttpCachePolicyBase() HttpCachePolicyBase()

Initializes the class for use by an inherited class instance. This constructor can only be called by an inherited class.

Properties

VaryByContentEncodings VaryByContentEncodings VaryByContentEncodings VaryByContentEncodings

When overridden in a derived class, gets the list of Content-Encoding headers that are used to vary the output cache.

VaryByHeaders VaryByHeaders VaryByHeaders VaryByHeaders

When overridden in a derived class, gets the list of all HTTP headers that are used to vary cache output.

VaryByParams VaryByParams VaryByParams VaryByParams

When overridden in a derived class, gets the list of parameters that are received by an HTTP GET or POST verb that affect caching.

Methods

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

When overridden in a derived class, registers a validation callback for the current response.

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

When overridden in a derived class, 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)

When overridden in a derived class, 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)

When overridden in a derived class, sets the Cache-Control header to the specified HttpCacheability value.

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

When overridden in a derived class, 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)

When overridden in a derived class, sets the ETag HTTP header to the specified string.

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

When overridden in a derived class, sets the ETag HTTP header based on the time stamps of the handler's file dependencies.

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

When overridden in a derived class, sets the Expires HTTP header to an absolute date and time.

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

When overridden in a derived class, sets the Last-Modified HTTP header to the specified date and time.

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

When overridden in a derived class, 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)

When overridden in a derived class, sets the Cache-Control: max-age HTTP header to the specified time span.

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

When overridden in a derived class, stops all origin-server caching for the current response.

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

When overridden in a derived class, sets the Cache-Control: no-store HTTP header.

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

When overridden in a derived class, sets the Cache-Control: no-transform HTTP header.

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

When overridden in a derived class, specifies whether the response contains the vary:* header when caching varies by parameters.

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

When overridden in a derived class, sets the Cache-Control: s-maxage HTTP header to the specified time span.

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

When overridden in a derived class, 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)

When overridden in a derived class, sets cache expiration to absolute or sliding.

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

When overridden in a derived class, specifies whether the ASP.NET cache should ignore HTTP Cache-Control headers that are sent by the client that invalidate the cache.

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

When overridden in a derived class, 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