package core_extended

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Least recently used caching

type ('k, 'v) t
type ('a, 'b) memo = ('a, ('b, exn) Core.Result.t) t
val find : ('k, 'v) t -> 'k -> 'v option
val add : ('k, 'v) t -> key:'k -> data:'v -> unit
val remove : ('k, _) t -> 'k -> unit
val clear : (_, _) t -> unit
val create : destruct:('v -> unit) option -> int -> ('k, 'v) t
val call_with_cache : cache:('a, 'b) memo -> ('a -> 'b) -> 'a -> 'b
val memoize : ?destruct:('b -> unit) -> ('a -> 'b) -> int -> ('a, 'b) memo * ('a -> 'b)
OCaml

Innovation. Community. Security.