MemoryCache.Remove 메서드

정의

캐시에서 지정된 항목을 제거합니다.

오버로드

Name Description
Remove(String, String)

캐시에서 캐시 항목을 제거합니다.

Remove(String, CacheEntryRemovedReason, String)

이유를 사용하여 캐시에서 캐시 항목을 제거합니다.

Remove(String, String)

Source:
MemoryCache.cs
Source:
MemoryCache.cs
Source:
MemoryCache.cs
Source:
MemoryCache.cs

캐시에서 캐시 항목을 제거합니다.

public override object Remove(string key, string regionName = default);
override this.Remove : string * string -> obj
Public Overrides Function Remove (key As String, Optional regionName As String = Nothing) As Object

매개 변수

key
String

제거할 캐시 항목의 고유 식별자입니다.

regionName
String

캐시 항목이 추가된 캐시의 명명된 지역입니다. 이 매개 변수에 대한 값을 전달하지 마세요. 클래스가 null 지역을 구현하지 않으므로 이 매개 변수는 기본적으로 MemoryCache 사용됩니다.

반품

캐시에 항목이 있으면 제거된 캐시 항목입니다. 그렇지 않으면 . null

예외

regionName 가 아닙니다 null.

keynull입니다.

설명

지정된 key 항목이 캐시에 있는 경우 항목을 제거하면 연결된 변경 모니터가 트리거됩니다. 제거된 항목이 개체 또는 개체와 CacheItemUpdateCallback 연결된 경우 콜백에 전달된 이유는 입니다CacheItemRemovedCallback.Removed

적용 대상

Remove(String, CacheEntryRemovedReason, String)

Source:
MemoryCache.cs
Source:
MemoryCache.cs
Source:
MemoryCache.cs
Source:
MemoryCache.cs

이유를 사용하여 캐시에서 캐시 항목을 제거합니다.

public object Remove(string key, System.Runtime.Caching.CacheEntryRemovedReason reason, string regionName = default);
override this.Remove : string * System.Runtime.Caching.CacheEntryRemovedReason * string -> obj
Public Function Remove (key As String, reason As CacheEntryRemovedReason, Optional regionName As String = Nothing) As Object

매개 변수

key
String

제거할 캐시 항목의 고유 식별자입니다.

reason
CacheEntryRemovedReason

항목이 제거된 이유입니다.

regionName
String

캐시 항목이 추가된 캐시의 명명된 지역입니다. 이 매개 변수에 대한 값을 전달하지 마세요. 클래스가 null 지역을 구현하지 않으므로 이 매개 변수는 기본적으로 MemoryCache 사용됩니다.

반품

캐시에 항목이 있으면 제거된 캐시 항목입니다. 그렇지 않으면 . null

적용 대상