OutputCacheSection Class

Specifies output cache settings for an ASP.NET application.

Syntax

class OutputCacheSection : ConfigurationSection  

Methods

The following table lists the methods exposed by the OutputCacheSection class.

Name Description
GetAllowDefinition (Inherited from ConfigurationSection.)
GetAllowLocation (Inherited from ConfigurationSection.)
RevertToParent (Inherited from ConfigurationSection.)
SetAllowDefinition (Inherited from ConfigurationSection.)
SetAllowLocation (Inherited from ConfigurationSection.)

Properties

The following table lists the properties exposed by the OutputCacheSection class.

Name Description
EnableFragmentCache A read/write boolean value. true if the application fragment cache is enabled; otherwise, false. The default is true.

If the fragment cache is disabled, no pages are cached, regardless of the @ OutputCache directive or caching profile used.
EnableKernelCacheForVaryByStar A read/write boolean value. true if kernel caching is enabled for the application when "Vary: *" headers are included in cached pages; otherwise, false. The default is false.
EnableOutputCache A read/write boolean value. true if the page output cache is enabled; otherwise, false. The default is true.

If the output cache is disabled, no pages are cached, regardless of any programmatic or declarative settings.
Location (Inherited from ConfigurationSection.) A key property.
OmitVaryStar An optional read/write boolean value. true if an HTTP "Vary: *" header is omitted in the response; otherwise, false. The default is false, which sends a "Vary: *" header for output cached pages.

The Vary header indicates the request-header fields that the server uses to determine which of multiple cached responses are sent in response to a client request.
Path (Inherited from ConfigurationSection.) A key property.
SectionInformation (Inherited from ConfigurationSection.)
SendCacheControlHeader An optional read/write boolean value. true if the Cache-Control: private header is sent by the output cache module by default; otherwise, false. The default is true.

Subclasses

This class contains no subclasses.

Inheritance Hierarchy

ConfigurationSection

OutputCacheSection

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
MOF file WebAdministration.mof

See Also

System.Web.Configuration.OutputCacheSection System.Web.Configuration.SystemWebCachingSectionGroup.OutputCache
CacheSection Class
CachingProfileElement Class
CachingSection Class
ConfigurationSection Class