Interface IReadOnlyCache<TKey, TValue>
Represents a generic read-only cache of keyed entries.
public interface IReadOnlyCache<TKey, TValue> : IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable where TKey : notnull
Type Parameters
TKey
Entry key (identifier) type.
TValue
Entry value type.
- Inherited Members
- Extension Methods
Properties
Capacity
Maximum capacity of this cache. Adding entries to caches whose capacity have been reached will cause their Oldest entry to be removed.
int Capacity { get; }
Property Value
Comparer
IEqualityComparer<T> instance used for key equality comparison.
IEqualityComparer<TKey> Comparer { get; }
Property Value
- IEqualityComparer<TKey>
Oldest
Currently oldest cache entry.
KeyValuePair<TKey, TValue>? Oldest { get; }
Property Value
- KeyValuePair<TKey, TValue>?