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


Previous page Back to top Next page

Check out related books at Amazon

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note