MCPcopy Create free account
hub / github.com/Effect-TS/effect / hasExpired

Function hasExpired

packages/effect/src/ScopedCache.ts:376–381  ·  view source on GitHub ↗
(entry: Entry<A, E>, fiber: Fiber.Fiber<unknown, unknown>)

Source from the content-addressed store, hash-verified

374}
375
376const hasExpired = <A, E>(entry: Entry<A, E>, fiber: Fiber.Fiber<unknown, unknown>): boolean => {
377 if (entry.expiresAt === undefined) {
378 return false
379 }
380 return fiber.getRef(effect.ClockRef).currentTimeMillisUnsafe() >= entry.expiresAt
381}
382
383// Expiry and capacity eviction report cleanup failures without failing unrelated readers.
384const closeEvicted = <A, E>(entry: Entry<A, E>): Effect.Effect<void> =>

Callers 2

ScopedCache.tsFile · 0.70
getImplFunction · 0.70

Calls 2

getRefMethod · 0.80

Tested by

no test coverage detected