asp.net.ph

HttpCachePolicy.SetRevalidation Method

System.Web Namespace   HttpCachePolicy Class


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

[ VB ]
Public Sub SetRevalidation ( _
   ByVal revalidation As HttpCacheRevalidation _
)

[ C# ]
public void SetRevalidation (
   HttpCacheRevalidation revalidation
);

[ C++ ]
public: void SetRevalidation (
   HttpCacheRevalidation revalidation
);

[ JScript ]
public function SetRevalidation (
   revalidation : HttpCacheRevalidation
);

Parameters

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

Exceptions


Exception Type Condition
ArgumentOutOfRangeException Occurs when revalidation is not one of the enumeration values.

Remarks

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

Example

The following example sets cache revalidation to on ( true ).

[ VB ]
Response.Cache.SetRevalidation ( HttpCacheRevalidation.AllCaches )

[ C# ]
Response.Cache.SetRevalidation ( HttpCacheRevalidation.AllCaches );

[ JScript ] 
Response.Cache.SetRevalidation ( HttpCacheRevalidation.AllCaches )
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