Export (0) Print
Expand All

SystemWebCachingSectionGroup Class

Configures the caching group within a configuration file. This class cannot be inherited.

System.Object
  System.Configuration.ConfigurationSectionGroup
    System.Web.Configuration.SystemWebCachingSectionGroup

Namespace:  System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

public sealed class SystemWebCachingSectionGroup : ConfigurationSectionGroup

The SystemWebCachingSectionGroup type exposes the following members.

  NameDescription
Public methodSystemWebCachingSectionGroupInfrastructure. Creates a new instance of SystemWebCachingSectionGroup.
Top

  NameDescription
Public propertyCacheGets the cache section contained within the configuration.
Public propertyIsDeclarationRequiredGets a value that indicates whether this ConfigurationSectionGroup object declaration is required. (Inherited from ConfigurationSectionGroup.)
Public propertyIsDeclaredGets a value that indicates whether this ConfigurationSectionGroup object is declared. (Inherited from ConfigurationSectionGroup.)
Public propertyNameGets the name property of this ConfigurationSectionGroup object. (Inherited from ConfigurationSectionGroup.)
Public propertyOutputCacheGets the outputCache section contained within the configuration.
Public propertyOutputCacheSettingsGets the outputCacheSettings section contained within the configuration.
Public propertySectionGroupNameGets the section group name associated with this ConfigurationSectionGroup. (Inherited from ConfigurationSectionGroup.)
Public propertySectionGroupsGets a ConfigurationSectionGroupCollection object that contains all the ConfigurationSectionGroup objects that are children of this ConfigurationSectionGroup object. (Inherited from ConfigurationSectionGroup.)
Public propertySectionsGets a ConfigurationSectionCollection object that contains all of ConfigurationSection objects within this ConfigurationSectionGroup object. (Inherited from ConfigurationSectionGroup.)
Public propertySqlCacheDependencyGets the sqlCacheDependency section contained within the configuration.
Public propertyTypeGets or sets the type for this ConfigurationSectionGroup object. (Inherited from ConfigurationSectionGroup.)
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public methodForceDeclaration()Forces the declaration for this ConfigurationSectionGroup object. (Inherited from ConfigurationSectionGroup.)
Public methodForceDeclaration(Boolean)Forces the declaration for this ConfigurationSectionGroup object. (Inherited from ConfigurationSectionGroup.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodShouldSerializeSectionGroupInTargetVersionIndicates whether the current ConfigurationSectionGroup instance should be serialized when the configuration object hierarchy is serialized for the specified target version of the .NET Framework. (Inherited from ConfigurationSectionGroup.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The SystemWebCachingSectionGroup class provides a way to programmatically access and modify the caching section of a configuration file.

The SystemWebCachingSectionGroup class and the caching section provide centralized control of the caching mechanism for a site or application. This makes it possible for caching to be deployed, modified, and disabled without modifying individual pages in the application.

The ASP.NET caching mechanism is implemented by the Cache class. For more information, see ASP.NET Caching Overview

The following list describes the two types of caching ASP.NET provides.

  • The first is called output caching, which allows you to store dynamic page and user control responses. On subsequent requests, the page or user control code is not executed; the cached output is used to satisfy the request. You can access output caching settings using the OutputCache and OutputCacheSettings properties.

  • The second type of caching is traditional application data caching, which you can use to programmatically store arbitrary objects to server memory so your application can save the time and resources it takes to recreate them. You can access these cache settings using the Cache property.

The following code example shows how to obtain the SystemWebCachingSectionGroup object from the configuration file associated with an existing Web application. You can use this object to access the sections contained in the caching group.


            // Get the Web application configuration.
            System.Configuration.Configuration configuration =
                WebConfigurationManager.OpenWebConfiguration(
                "/aspnetTest");

            // Get the <caching> section group.
            SystemWebCachingSectionGroup cachingSectionGroup =
              (SystemWebCachingSectionGroup)configuration.GetSectionGroup(
              "system.web/caching");

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft