Skip to content

TryRemove Method ​

Definition ​

  • Namespace: JASE.Caching
  • Assembly: JASE.Caching.dll

bool TryRemove(TKey key) ​

csharp
bool TryRemove(TKey key)

Attempts to remove the value associated with the specified key.

Parameters ​

NameDescription
keyThe cache key.

Returns ​

true if the key was removed; otherwise false.

Remarks ​

If the value is removed and TValue implements IDisposable, the removed value is disposed unless the eviction callback claims ownership.