OutputCacheSettingsSection 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
애플리케이션 페이지에 대한 출력 캐시 설정을 구성합니다. 이 클래스는 상속할 수 없습니다.
public ref class OutputCacheSettingsSection sealed : System::Configuration::ConfigurationSection
public sealed class OutputCacheSettingsSection : System.Configuration.ConfigurationSection
type OutputCacheSettingsSection = class
inherit ConfigurationSection
Public NotInheritable Class OutputCacheSettingsSection
Inherits ConfigurationSection
- 상속
예제
다음 코드 예제에서는 기존 웹 애플리케이션의 OutputCacheSettingsSection 구성 파일에서 개체를 가져오는 방법을 보여줍니다.
// Get the Web application configuration.
System.Configuration.Configuration webConfig =
WebConfigurationManager.OpenWebConfiguration("/aspnetTest");
// Get the section.
string configPath =
"system.web/caching/outputCacheSettings";
System.Web.Configuration.OutputCacheSettingsSection outputCacheSettings =
(System.Web.Configuration.OutputCacheSettingsSection)webConfig.GetSection(
configPath);
' Get the Web application configuration.
Dim webConfig _
As System.Configuration.Configuration = _
WebConfigurationManager.OpenWebConfiguration( _
"/aspnetTest")
' Get the section.
Dim configPath As String = _
"system.web/caching/outputCacheSettings"
Dim outputCacheSettings _
As System.Web.Configuration.OutputCacheSettingsSection = _
CType(webConfig.GetSection(configPath), _
System.Web.Configuration.OutputCacheSettingsSection)
설명
이 OutputCacheSettingsSection 클래스를 사용하면 구성 파일에서 섹션의 outputCacheSettings 요소에 caching 프로그래밍 방식으로 액세스하고 수정할 수 있습니다. 출력 캐시 설정은 출력 캐싱에 사용되는 종속성(캐시 및 파일, 캐시 키 또는 CacheDependency 개체에 저장된 항목 간의 관계)을 정의합니다(예: @ OutputCache 지시문 또는 OutputCacheProfile.).
메모
값 OutputCacheSettingsSection 이 있는 섹션 속성 AllowDefinition 에 정의된 제한 사항에 따라 구성 파일의 관련 섹션에 정보를 쓸 수 있습니다 MachineToApplication. 계층 구조에서 허용되지 않는 수준에서 구성 파일에 쓰려고 하면 파서에서 오류 메시지가 생성됩니다. 그러나 이 클래스를 사용하여 계층 구조의 모든 수준에서 구성 정보를 읽을 수 있습니다.
생성자
| 속성 | Description |
|---|---|
| OutputCacheSettingsSection() |
OutputCacheSettingsSection 클래스의 새 인스턴스를 초기화합니다. |