effect-io-ai

Package: effect
Module: Cache

Cache.make

Constructs a new cache with the specified capacity, time to live, and lookup function.

Signature

declare const make: <Key, Value, Error = never, Environment = never>(options: { readonly capacity: number; readonly timeToLive: Duration.DurationInput; readonly lookup: Lookup<Key, Value, Error, Environment>; }) => Effect.Effect<Cache<Key, Value, Error>, never, Environment>

Source

Since v2.0.0