effect-io-ai

Package: effect
Module: ScopedCache

ScopedCache.has

Checks whether the cache contains an entry for the specified key.

When to use

Use to test whether an unexpired entry exists for a key without running the cache lookup.

Details

This does not start lookups and does not refresh access order. Expired entries are treated as absent and their scopes are closed while checking. If the cache is closed, the effect is interrupted.

See

Signature

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

Source

Since v4.0.0