TtlCache

constructor(ttl: Duration, maxSize: Int = Int.MAX_VALUE, timeSource: TimeSource.WithComparableMarks = TimeSource.Monotonic)

Creates an empty cache with the given time-to-live, capacity, and time source.

Type Parameters

K

the key type.

V

the value type.