Up

Module Deferred_cache = Deferred_cache

Signature

type ('a, 'b) t
val create : add_to_cache:('a -> 'b Core.Std.Or_error.t Async.Std.Deferred.t) -> to_remove:('b -> unit Async.Std.Deferred.t) -> hashable:'a Core.Std.Hashtbl.Hashable.t -> ?on_exn:('a -> exn -> unit) -> ?cache_errors:bool -> ?remove_if_unread_for:Core.Std.Time.Span.t -> ?max_cached_data_age:Core.Std.Time.Span.t -> ?max_total_concurrent_jobs:int -> unit -> ('a, 'b) t
val find : ('a, 'b) t -> key:'a -> 'b Core.Std.Or_error.t Async.Std.Deferred.t
val find_cached_only : ('a, 'b) t -> key:'a -> 'b option
val remove : ('a, _) t -> key:'a -> unit Async.Std.Deferred.t