Module Lru_cache.Make_with_monad

Parameters

module M : Monad
module K : Key

Signature

type key = K.t
type 'a monad = 'a M.t
type 'a t
val init : ?⁠validate:('a monad -> bool monad) -> size:int -> 'a t
val in_cache : 'a t -> key -> bool
val get : 'a t -> ?⁠validate:('a monad -> bool monad) -> key -> (key -> 'a monad) -> 'a monad