( capacity: number, lookup: Cache.Lookup<Key, Value, Error>, timeToLive: (exit: Exit.Exit<Value, Error>) => Duration.DurationInput )
| 720 | |
| 721 | /** @internal */ |
| 722 | export 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 | ) |