effect-io-ai

Package: effect
Module: ScopedCache

ScopedCache.getSuccess

Retrieves the value associated with the specified key from the cache, only if it contains a resolved successful value.

When to use

Use to inspect an already-completed successful scoped cache entry without running or awaiting the lookup effect.

Details

Returns Option.some for a resolved successful entry. Returns Option.none for missing, expired, failed, or still-pending entries.

See

Signature

declare const getSuccess: { <Key, A, R>(key: Key): <E>(self: ScopedCache<Key, A, E, R>) => Effect.Effect<Option.Option<A>>; <Key, A, E, R>(self: ScopedCache<Key, A, E, R>, key: Key): Effect.Effect<Option.Option<A>>; }

Source

Since v4.0.0