Hyperlinkv0.8.0-beta.28

RcRef

RcRef.invalidateconsteffect/RcRef.ts:225
<A, E>(self: RcRef<A, E>): Effect.Effect<void>

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.

combinatorsget
Source effect/RcRef.ts:2251 lines
export const invalidate: <A, E>(self: RcRef<A, E>) => Effect.Effect<void> = internal.invalidate
Referenced by 1 symbols