ViewPage<TModel>.InitOutputCache Method

Include Protected Members
Include Inherited Members

Initializes the output cache for the current page request.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Overload List

  Name Description
Protected method InitOutputCache(OutputCacheParameters) Infrastructure. Initializes the output cache for the current page request based on an OutputCacheParameters object. (Inherited from Page.)
Protected method InitOutputCache(Int32, String, String, OutputCacheLocation, String) Infrastructure. Initializes the output cache for the current page request. (Inherited from Page.)
Protected method InitOutputCache(Int32, String, String, String, OutputCacheLocation, String) Infrastructure. Initializes the output cache for the current page request. (Inherited from Page.)

Top

Remarks

This method is not intended to be used directly from your code. To enable and manipulate output caching for a page, use one of these approaches:

  • Set options declaratively using the @ OutputCache directive in the .aspx file.

  • Use the methods and properties of the HttpCachePolicy class, which is exposed by the Response.Cache object in the page's code.

For more information, see Caching ASP.NET Pages.

See Also

Reference

ViewPage<TModel> Class

System.Web.Mvc Namespace