Export (0) Print
Expand All

SystemWebCachingSectionGroup Class

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

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

public sealed class SystemWebCachingSectionGroup : ConfigurationSectionGroup
public final class SystemWebCachingSectionGroup extends ConfigurationSectionGroup
public final class SystemWebCachingSectionGroup extends ConfigurationSectionGroup
Not applicable.

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 Introduction to Caching in ASP.NET

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");


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

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

Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2014 Microsoft