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.
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.
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" );
Response.Cache.SetCacheability ( HttpCacheability.Private, "Community=DEV" ) |
|
C# |
VB |
HttpCachePolicy Members Caching ASP.NET Pages