Hyperlinkv0.8.0-beta.28

ScopedCache

ScopedCache.valuesconsteffect/ScopedCache.ts:776
<Key, A, E, R>(self: ScopedCache<Key, A, E, R>): Effect.Effect<Array<A>>

Retrieves all successfully cached values from the cache, excluding failed lookups and expired entries.

When to use

Use to inspect currently successful cached values without running cache lookups.

Gotchas

Expired entries are removed and their scopes are closed while filtering.

combinatorsentrieskeys
export const values = <Key, A, E, R>(self: ScopedCache<Key, A, E, R>): Effect.Effect<Array<A>> =>
  effect.map(entries(self), Arr.map(([, value]) => value))