CacheSection Class

Defines cache settings for an ASP.NET Web application.

Syntax

class CacheSection : ConfigurationSection  

Methods

The following table lists the methods exposed by the CacheSection 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 CacheSection class.

Name Description
DisableExpiration An optional read/write boolean value. true if cache expiration is disabled; otherwise, false. The default is false.

When disabled, cached items do not expire and background cleanup of expired cache items does not occur.
DisableMemoryCollection An optional read/write boolean value. true if the cache memory collection that occurs when the computer is under memory pressure is disabled; otherwise, false. The default is false.
Location (Inherited from ConfigurationSection.) A key property.
Path (Inherited from ConfigurationSection.) A key property.
PercentagePhysicalMemoryUsedLimit An optional read/write sint32 value that specifies the maximum percentage of a computer's physical memory that can be consumed by an application before the cache starts to flush expired items and attempts to reclaim memory. The default is 89.

The specified percentage includes both memory used by the cache as well as the normal memory used by the running application. A setting of 0 indicates that ASP.NET will use its own heuristics for determining when to start reclaiming memory.
PrivateBytesLimit An optional read/write string value that specifies the maximum size, in bytes, of an application's private memory cache before the cache starts to flush expired items and attempts to reclaim memory. The default is 0.

The specified limit includes both memory used by the cache as well as normal memory used by the running application. A setting of 0 indicates that ASP.NET will use its own heuristics for determining when to start reclaiming memory.
PrivateBytesPollTime An optional read/write datetime value that specifies the time interval between successive pollings for an application's private memory usage. The default is 2 minutes.
SectionInformation (Inherited from ConfigurationSection.)

Subclasses

This class contains no subclasses.

Inheritance Hierarchy

ConfigurationSection

CacheSection

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

CachingProfileElement Class
CachingSection Class
ConfigurationSection Class
OutputCacheSection Class
CIM_DATETIME