asp.net.ph

Response.Cache Property

System.Web Namespace   HttpResponse Class


Sets or gets the caching policy ( expiration time, privacy, vary clauses ) of a Web page.

[ VB ]
Public ReadOnly Property Cache As HttpCachePolicy

[ C# ]
public HttpCachePolicy Cache {get;}

[ C++ ]
public: __property HttpCachePolicy* get_Cache ( );

[ JScript ]
public function get Cache ( ) : HttpCachePolicy;

Property Value

An HttpCachePolicy object containing information about the caching policy of the current response.

Example

The following example sets properties of the current cache policy as the HTTP response is written to the output stream.

Response.Cache.SetExpires ( DateTime.Now.AddSeconds ( 60 ) );
Response.Cache.SetCacheability ( HttpCacheability.Public );
Response.Cache.SetValidUntilExpires ( false );
  C# VB

See Also

HttpResponse Members   HttpCachePolicy Class   ASP.NET Caching Features 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