Interface IMemoryCache<TK, T>
Provides functionality to add, remove, and get objects in a cache.
public interface IMemoryCache<TK, T>
Type Parameters
TKT
- Extension Methods
Properties
this[TK]
T this[TK key] { get; }
Parameters
keyTK
Property Value
- T
Methods
Add(TK, T)
void Add(TK key, T value)
Parameters
keyTKvalueT
Add(TK, T, int, bool)
void Add(TK key, T value, int timeout, bool restartTimer = false)
Parameters
Clear()
void Clear()
Dispose()
void Dispose()
Exists(TK)
bool Exists(TK key)
Parameters
keyTK
Returns
Get(TK)
T Get(TK key)
Parameters
keyTK
Returns
- T
Remove(Predicate<TK>)
void Remove(Predicate<TK> pattern)
Parameters
patternPredicate<TK>
Remove(TK)
void Remove(TK key)
Parameters
keyTK
TryGet(TK, out T)
bool TryGet(TK key, out T value)
Parameters
keyTKvalueT