OutputCacheProfile 클래스
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
애플리케이션 페이지에서 사용할 수 있는 출력 캐시 프로필을 구성합니다. 이 클래스는 상속할 수 없습니다.
public ref class OutputCacheProfile sealed : System::Configuration::ConfigurationElement
public sealed class OutputCacheProfile : System.Configuration.ConfigurationElement
type OutputCacheProfile = class
inherit ConfigurationElement
Public NotInheritable Class OutputCacheProfile
Inherits ConfigurationElement
- 상속
예제
다음 코드 예제에서는 컬렉션을 사용 하 여 OutputCacheProfiles 해당 OutputCacheProfile 개체에 액세스 하는 방법을 보여 있습니다.
// 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 profile at zero index.
System.Web.Configuration.OutputCacheProfile outputCacheProfile =
outputCacheSettings.OutputCacheProfiles[0];
' 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)
' Get the profile at zero index.
Dim outputCacheProfile _
As System.Web.Configuration.OutputCacheProfile = _
outputCacheSettings.OutputCacheProfiles(0)
설명
클래스는 OutputCacheProfile 프로그래밍 방식으로 액세스 하 고 구성 파일의 섹션에서 섹션 add 의 outputCacheProfiles 요소를 수정 caching 하는 방법을 제공 합니다.
개체는 OutputCacheProfile 종속성, 캐시 위치 및 캐시 만료 시간과 같은 자주 사용되는 구성 설정을 중앙 집중화하므로 모든 페이지에서 지정할 필요가 없습니다.
지시 OutputCacheProfile 문의 CacheProfile 특성을 사용하여 @ OutputCache 페이지에 적용할 수 있습니다.
메모
지시문은 @ OutputCache 특성을 제외한 개체에 OutputCacheProfile 포함된 모든 설정을 재정의할 Enabled 수 있습니다. 이는 재정의되었을 OutputCacheProfile 수 있는 모든 페이지에서 지시문을 수정하지 않고도 사용하거나 사용하지 않도록 설정하는 것입니다.
클래스는 CacheDependency 캐시된 항목이 변경되면 캐시된 항목이 자동으로 제거되도록 종속성을 모니터링합니다.
생성자
| Name | Description |
|---|---|
| OutputCacheProfile(String) |
OutputCacheProfile 클래스의 새 인스턴스를 초기화합니다. |
속성
| Name | Description |
|---|---|
| CurrentConfiguration |
현재 Configuration 인스턴스가 속한 구성 계층 구조를 나타내는 최상위 ConfigurationElement 인스턴스에 대한 참조를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| Duration |
페이지 또는 컨트롤이 캐시되는 기간을 가져오거나 설정합니다. |
| ElementInformation |
사용자 지정할 수 없는 정보와 ElementInformation 개체의 기능이 포함된 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| ElementProperty |
ConfigurationElementProperty 개체 자체를 나타내는 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| Enabled |
캐싱을 사용할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다. |
| EvaluationContext |
ContextInformation 개체에 대한 ConfigurationElement 개체를 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| HasContext |
CurrentConfiguration 속성이 |
| Item[ConfigurationProperty] |
이 구성 요소의 속성 또는 특성을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| Item[String] |
이 구성 요소의 속성, 특성 또는 자식 요소를 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| Location |
출력 캐시 위치를 가져오거나 설정합니다. |
| LockAllAttributesExcept |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockAllElementsExcept |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockAttributes |
잠긴 특성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockElements |
잠긴 요소의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| LockItem |
요소가 잠겨 있는지 여부를 나타내는 값을 가져오거나 설정합니다. (다음에서 상속됨 ConfigurationElement) |
| Name |
이름을 가져오거나 설정합니다 OutputCacheProfile . |
| NoStore |
보조 스토리지를 사용할 수 있는지 여부를 나타내는 값을 가져오거나 설정합니다. |
| Properties |
속성의 컬렉션을 가져옵니다. (다음에서 상속됨 ConfigurationElement) |
| SqlDependency |
속성을 가져오거나 설정합니다 SqlDependency . |
| VaryByContentEncoding |
캐시할 세미콜론으로 구분된 콘텐츠 인코딩 집합을 가져오거나 설정합니다. |
| VaryByControl |
속성을 가져오거나 설정합니다 VaryByControl . |
| VaryByCustom |
속성을 가져오거나 설정합니다 VaryByCustom . |
| VaryByHeader |
속성을 가져오거나 설정합니다 VaryByHeader . |
| VaryByParam |
속성을 가져오거나 설정합니다 VaryByParam . |