다음을 통해 공유


CacheSection.DisableMemoryCollection 속성

정의

캐시 메모리 컬렉션을 사용할 수 없는지 여부를 나타내는 값을 가져오거나 설정합니다.

public:
 property bool DisableMemoryCollection { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("disableMemoryCollection", DefaultValue=false)]
public bool DisableMemoryCollection { get; set; }
[<System.Configuration.ConfigurationProperty("disableMemoryCollection", DefaultValue=false)>]
member this.DisableMemoryCollection : bool with get, set
Public Property DisableMemoryCollection As Boolean

속성 값

true캐시 메모리 컬렉션을 사용하지 않도록 설정하면 이고, 그렇지 않으면 . false 기본값은 false입니다.

특성

예제

다음 코드 예제에서는 속성을 사용 하는 방법을 보여 있습니다 DisableMemoryCollection .

// Enable or disable memory collection.
cacheSection.DisableMemoryCollection = 
        !cacheSection.DisableMemoryCollection;
' Enable or disable memory collection.
cacheSection.DisableMemoryCollection =
    Not cacheSection.DisableMemoryCollection

설명

속성이 DisableMemoryCollection 설정된 true경우 캐시 관련 API에 대한 호출은 영향을 주지 않습니다.

속성이 DisableMemoryCollection 설정된 true경우 캐시는 사용되지 않는 항목을 수집하려고 시도하지 않습니다. 메모리 수집을 사용하지 않도록 설정하면 애플리케이션의 메모리 부족 상태가 빠르게 발생할 수 있으므로 이 설정을 사용할 때는 주의해야 합니다.

이 설정은 ASP.NET 내부 캐시 또는 출력 캐시에 영향을 주지 않습니다. 다양한 유형의 캐시에 대한 자세한 내용은 캐싱을 참조하세요.

적용 대상

추가 정보