asp.net.ph

HttpCachePolicy.AddValidationCallback Method

System.Web Namespace   HttpCachePolicy Class


Registers a validation callback for the current response.

[ VB ]
Public Sub AddValidationCallback ( _
   ByVal handler As HttpCacheValidateHandler, _
   ByVal data As Object _
)

[ C# ]
public void AddValidationCallback (
   HttpCacheValidateHandler handler,
   object data
);

[ C++ ]
public: void AddValidationCallback (
   HttpCacheValidateHandler* handler,
   Object* data
);

[ JScript ]
public function AddValidationCallback (
   handler : HttpCacheValidateHandler,
   data : Object
);

Parameters

handler
The HttpCacheValidateHandler value.
data
The arbitrary user-supplied data that is passed back to the AddValidationCallback delegate.

Exceptions


Exception Type Condition
ArgumentNullException Occurs when handler is a null reference ( Nothing in Visual Basic ).

Remarks

AddValidationCallback provides a mechanism to programmatically check the validity of an item in the cache before the item is returned from the cache.

Before the response is served from the Web server cache, all registered handlers are queried to ensure resource validity. If any handler sets a flag indicating that the resource is invalid, the entry is marked invalid and evicted from the cache. The request is then handled as if it were a cache miss.

See Also

HttpCachePolicy Members   Caching ASP.NET Pages Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph