HttpCacheValidateHandler Delegate

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Represents a method that is called to validate a cached item before the item is served from the cache.

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

public delegate void HttpCacheValidateHandler(
	HttpContext^ context,
	Object^ data,
	HttpValidationStatus% validationStatus
)

Parameters

context
Type: System.Web::HttpContext^

The HttpContext object containing information about the current request.

data
Type: System::Object^

User-supplied data used to validate the cached item.

validationStatus
Type: System.Web::HttpValidationStatus%

An HttpValidationStatus enumeration value. Your delegate should set this value to indicate the result of the validation.

If a cached item is invalidated within the scope of the HttpCacheValidateHandler method, it is evicted from the cache and the request for the item is treated as a cache miss.

The following code example demonstrates how to add a new cache validation delegate to an application.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: