asp.net.ph

HttpCachePolicy.SetCacheability Method

System.Web Namespace   HttpCachePolicy Class


Sets the Cache-Control HTTP header. The Cache-Control HTTP header controls how documents are to be cached on the network.

Overload List

1. Sets the Cache-Control header to one of the values of HttpCacheability.

2. Sets the Cache-Control header to one of the values of HttpCacheability and appends an extension to the directive.


Example

The following example sets the Cache-Control header to the enumeration value private and adds a cache-control extension. The modified directive means that in addition to any non shared cache, any cache shared only by members of the community named "DEV" may cache the response.

NOTE: This example shows how to use one of the overloaded versions of SetCacheability. For other examples that might be available, see the individual overload topics.

Response.Cache.SetCacheability ( HttpCacheability.Private, "Community=DEV" );
  C# VB

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