CacheSection.DisableMemoryCollection 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
캐시 메모리 컬렉션을 사용할 수 없는지 여부를 나타내는 값을 가져오거나 설정합니다.
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 내부 캐시 또는 출력 캐시에 영향을 주지 않습니다. 다양한 유형의 캐시에 대한 자세한 내용은 캐싱을 참조하세요.