This documentation is archived and is not being maintained.

HttpCachePolicy.SetRevalidation Method

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

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

public void SetRevalidation (
	HttpCacheRevalidation revalidation
public void SetRevalidation (
	HttpCacheRevalidation revalidation
public function SetRevalidation (
	revalidation : HttpCacheRevalidation
Not applicable.



The HttpCacheRevalidation enumeration value to set the Cache-Control header to.

Exception typeCondition


revalidation is not one of the enumeration values.

The default, which is equivalent to None, is to send neither directive in a header unless explicitly specified by this method.

The following code example demonstrates how to set cache revalidation to AllCaches.




Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0, 1.1, 1.0