Whether key has a live entry. Sweeps expired entries first so that a session past its idle TTL is not reported as present.
Pointer to the live value for key, or null when absent. Sweeps expired entries before the lookup so a session past its idle TTL is not returned. When refresh is set, a hit stamps the entry as just-active so it survives future idle sweeps.
Number of live entries.
Sweep expired entries, evict the oldest if inserting a new key would exceed the cap, then store value and stamp it as just-active.
Remove the entry for key from both maps. Returns whether it existed.
Sweep expired entries, then consume and return the entry for key, setting found. The entry is removed (single use).
A string-keyed cache of V with a per-entry insertion/activity timestamp, bounded by an idle TTL and a maximum live-entry count. It owns the value map and the parallel timestamp map together so the "remove from both" invariant lives in one place, and runs the TTL sweep + LRU cap eviction internally.
ttl == Duration.zero disables the sweep; maxEntries == 0 disables the cap. clock is injectable (null => MonoTime.currTime) so callers can drive expiry deterministically in tests. The container does no locking; the owner serializes access (e.g. synchronized on a synchronized-using class, or vibe.d's single-fiber loop).