SystemWebCachingSectionGroup.Cache Property

 

Gets the cache section contained within the configuration.

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

<ConfigurationPropertyAttribute("cache")>
Public ReadOnly Property Cache As CacheSection

Property Value

Type: System.Web.Configuration.CacheSection

The CacheSection object.

The CacheSection object refers to the cache section of the configuration file. You can use the CacheSection class to modify the cache section programmatically.

The following code example shows how to obtain the CacheSection object from the configuration file of an existing Web application.

' Get the <cache> section.
Dim cache As CacheSection = _
cachingSectionGroup.Cache

' Display one of its properties.
msg = String.Format( _
"Cache disable expiration: {0}" + _
ControlChars.Lf, cache.DisableExpiration)

Console.Write(msg)

.NET Framework
Available since 2.0
Return to top
Show: