MobilePage.InitOutputCache Method

Definition

Initializes the output cache for the current page request. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Overloads

InitOutputCache(Int32, String, String, OutputCacheLocation, String)

Initializes the output cache for the current page request. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

InitOutputCache(Int32, String, String, String, OutputCacheLocation, String)

Initializes the output cache for the current page request. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

Remarks

InitOutputCache is introduced in the .NET Framework version 3.5. For more information, see Versions and Dependencies.

InitOutputCache(Int32, String, String, OutputCacheLocation, String)

Initializes the output cache for the current page request. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

C#
protected override void InitOutputCache (int duration, string varyByHeader, string varyByCustom, System.Web.UI.OutputCacheLocation location, string varyByParam);

Parameters

duration
Int32

The amount of time that objects stored in the output cache are valid.

varyByHeader
String

A semicolon-separated list of headers that content from the output cache will vary by.

varyByCustom
String

The Vary HTTP header.

location
OutputCacheLocation

One of the OutputCacheLocation values.

varyByParam
String

A semicolon-separated list of parameters, received by a GET or POST method, that content from the output cache will vary by.

Remarks

This member overrides the Page.InitOutputCache method to add more VaryByHeader keywords to provide correct caching of page output for different markup devices.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1

InitOutputCache(Int32, String, String, String, OutputCacheLocation, String)

Initializes the output cache for the current page request. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.

C#
protected override void InitOutputCache (int duration, string varyByContentEncoding, string varyByHeader, string varyByCustom, System.Web.UI.OutputCacheLocation location, string varyByParam);

Parameters

duration
Int32

The amount of time that objects stored in the output cache are valid.

varyByContentEncoding
String

A semicolon-separated list of character-sets (content encodings) that content from the output cache will vary by.

varyByHeader
String

A semicolon-separated list of headers that content from the output cache will vary by.

varyByCustom
String

The Vary HTTP header.

location
OutputCacheLocation

One of the OutputCacheLocation values.

varyByParam
String

A semicolon-separated list of parameters, received by a GET or POST method, that content from the output cache will vary by.

Remarks

This member overrides the Page.InitOutputCache method to add more VaryByHeader keywords to provide correct caching of page output for different markup devices.

See also

Applies to

.NET Framework 4.8.1 and other versions
Product Versions
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1