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
)

Parameters

revalidation

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

Exception typeCondition

ArgumentOutOfRangeException

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.

No code example is currently available or this language may not be supported.
get_Response().get_Cache().SetRevalidation(
    HttpCacheRevalidation.AllCaches);

Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches)
    

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

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0, 1.1, 1.0

Community Additions

ADD
Show: