Table of Contents

Interface ILifetimeCache<TKey, TValue>

Namespace
LfrlAnvil.Chrono.Caching
Assembly
LfrlAnvil.Chrono.dll

Represents a generic cache of keyed entries with a limited lifetime.

public interface ILifetimeCache<TKey, TValue> : IReadOnlyLifetimeCache<TKey, TValue>, ICache<TKey, TValue>, 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

Remarks

Reading entries resets their lifetime.

Methods

Move(Duration)

Moves this cache forward in time and removes entries with elapsed lifetimes.

void Move(Duration delta)

Parameters

delta Duration

Duration to add to the CurrentTimestamp.