Page.InitOutputCache Method (Int32, String, String, OutputCacheLocation, String)
.NET Framework 3.0
This method supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Initializes the output cache for the current page request.
Namespace: System.Web.UIAssembly: System.Web (in system.web.dll)
protected void InitOutputCache ( int duration, String varyByHeader, String varyByCustom, OutputCacheLocation location, String varyByParam )
protected function InitOutputCache ( duration : int, varyByHeader : String, varyByCustom : String, location : OutputCacheLocation, varyByParam : String )
Not applicable.
Parameters
- duration
The amount of time that objects stored in the output cache are valid.
- varyByHeader
A semicolon-separated list of headers that content from the output cache will vary by.
- varyByCustom
The Vary HTTP header.
- location
One of the OutputCacheLocation values.
- varyByParam
A semicolon-separated list of parameters received by a GET or POST method that content from the output cache will vary by.
You should not call this method. To enable and manipulate output caching for a page, use either the @ OutputCache directive in the .aspx file, or the methods and properties of the HttpCachePolicy class. The latter are accessible through Response.Cache syntax in the page's code. For more information, see Caching ASP.NET Pages.
Community Additions
ADD
Show: