effect-io-ai

Package: effect
Module: RcRef

RcRef.invalidate

Invalidates the currently cached resource, if one has been acquired.

When to use

Use to force future RcRef.get calls to acquire a fresh resource when the currently cached resource should no longer be reused.

Details

After invalidation, the next get acquires a fresh resource.

Gotchas

Invalidation does not revoke resources already borrowed by active scopes; those remain usable until their scopes close.

See

Signature

declare const invalidate: <A, E>(self: RcRef<A, E>) => Effect.Effect<void>

Source

Since v3.19.6