Interface IReadOnlyLifetimeCache<TKey, TValue>
Represents a generic read-only cache of keyed entries with a limited lifetime.
public interface IReadOnlyLifetimeCache<TKey, TValue> : IReadOnlyCache<TKey, TValue>, IReadOnlyDictionary<TKey, TValue>, IReadOnlyCollection<KeyValuePair<TKey, TValue>>, IEnumerable<KeyValuePair<TKey, TValue>>, IEnumerable where TKey : notnullType Parameters
- TKey
- Entry key (identifier) type. 
- TValue
- Entry value type. 
- Inherited Members
Remarks
Reading entries resets their lifetime.
Properties
CurrentTimestamp
Timestamp at which this cache currently is.
Timestamp CurrentTimestamp { get; }Property Value
Lifetime
Lifetime of added entries.
Duration Lifetime { get; }Property Value
StartTimestamp
Timestamp of the creation of this cache.
Timestamp StartTimestamp { get; }Property Value
Methods
GetRemainingLifetime(TKey)
Gets the remaining lifetime of an entry with the specified key.
[Pure]
Duration GetRemainingLifetime(TKey key)Parameters
- keyTKey
- Key to check.