MCPcopy Index your code
hub / github.com/Effect-TS/effect / unsafeMakeWith

Function unsafeMakeWith

packages/effect/src/internal/cache.ts:722–733  ·  view source on GitHub ↗
(
  capacity: number,
  lookup: Cache.Lookup<Key, Value, Error>,
  timeToLive: (exit: Exit.Exit<Value, Error>) => Duration.DurationInput
)

Source from the content-addressed store, hash-verified

720
721/** @internal */
722export const unsafeMakeWith = <Key, Value, Error = never>(
723 capacity: number,
724 lookup: Cache.Lookup<Key, Value, Error>,
725 timeToLive: (exit: Exit.Exit<Value, Error>) => Duration.DurationInput
726): Cache.Cache<Key, Value, Error> =>
727 new CacheImpl<Key, Value, Error>(
728 capacity,
729 Context.empty() as Context.Context<any>,
730 none,
731 lookup,
732 (exit) => Duration.decode(timeToLive(exit))
733 )

Callers 1

query.tsFile · 0.85

Calls 1

decodeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…