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 지시문의 @ OutputCache 특성을 사용하여 CacheProfile 페이지에 적용할 수 있습니다.
참고
지시문은 @ 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 속성을 가져오거나 설정합니다. |