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

Function cacheIdleMs

packages/effect/src/ui/Query.ts:4563–4569  ·  view source on GitHub ↗
(input: Duration.Input | undefined)

Source from the content-addressed store, hash-verified

4561 )
4562
4563const cacheIdleMs = (input: Duration.Input | undefined): number => {
4564 const duration = Duration.fromInputUnsafe(input ?? "5 minutes")
4565 if (Duration.isNegative(duration)) {
4566 throw new Error("[Query] idleTimeToLive can't be negative")
4567 }
4568 return Duration.toMillis(duration)
4569}
4570
4571interface CacheEnv {
4572 readonly settleOnce: boolean

Callers 2

layerFunction · 0.85
buildCacheFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected