SystemWebCachingSectionGroup.OutputCacheSettings 속성

정의

구성에 outputCacheSettings 포함된 섹션을 가져옵니다.

public:
 property System::Web::Configuration::OutputCacheSettingsSection ^ OutputCacheSettings { System::Web::Configuration::OutputCacheSettingsSection ^ get(); };
[System.Configuration.ConfigurationProperty("outputCacheSettings")]
public System.Web.Configuration.OutputCacheSettingsSection OutputCacheSettings { get; }
[<System.Configuration.ConfigurationProperty("outputCacheSettings")>]
member this.OutputCacheSettings : System.Web.Configuration.OutputCacheSettingsSection
Public ReadOnly Property OutputCacheSettings As OutputCacheSettingsSection

속성 값

OutputCacheSettingsSection 개체

특성

예제

다음 코드 예제에서는 기존 웹 애플리케이션의 OutputCacheSettingsSection 구성 파일에서 개체를 가져오는 방법을 보여줍니다.


// Get the .<outputCacheSettings> section
OutputCacheSettingsSection outputCacheSettings=
    cachingSectionGroup.OutputCacheSettings;

// Display the number of existing 
// profiles.
int profilesCount = 
    outputCacheSettings.OutputCacheProfiles.Count;
msg = String.Format(
"Number of profiles: {0}\n",
profilesCount.ToString());

Console.Write(msg);
' Get the .<outputCacheSettings> section
Dim outputCacheSettings _
As OutputCacheSettingsSection = _
cachingSectionGroup.OutputCacheSettings

' Display the number of existing 
' profiles.
Dim profilesCount As Integer = _
outputCacheSettings.OutputCacheProfiles.Count
msg = String.Format( _
"Number of profiles: {0}" + _
ControlChars.Lf, profilesCount.ToString())

Console.Write(msg)

설명

개체는 OutputCacheSettingsSection 구성 파일의 outputCacheSettings 섹션을 참조합니다.

출력 캐시 설정은 디스크 기반 영구 출력 캐시를 사용하거나 사용하지 않도록 설정하고, 캐시할 데이터를 유지할 위치를 정의하고, 애플리케이션당 캐시의 최대 크기를 지정합니다.

ASP.NET @ OutputCache 지시문의 특성을 사용하고 프로그래밍 방식으로 HttpCachePolicy 클래스의 속성과 메서드를 사용하여 여러 버전의 페이지 응답을 선언적으로 캐시할 수 있습니다.

또는 형식을 사용하여 OutputCacheSettingsSectionOutputCacheProfile 애플리케이션을 구성하여 동일한 결과를 얻을 수 있습니다.

적용 대상

추가 정보