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

Function hasExpired

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

Source from the content-addressed store, hash-verified

295)
296
297const hasExpired = <A, E>(entry: Entry<A, E>, fiber: Fiber.Fiber<unknown, unknown>): boolean => {
298 if (entry.expiresAt === undefined) {
299 return false
300 }
301 return fiber.getRef(effect.ClockRef).currentTimeMillisUnsafe() >= entry.expiresAt
302}
303
304const checkCapacity = <K, A, E>(
305 parent: Fiber.Fiber<unknown, unknown>,

Callers 2

ScopedCache.tsFile · 0.70
getImplFunction · 0.70

Calls 2

getRefMethod · 0.80

Tested by

no test coverage detected