package incremental

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

Represents parameters to initialize a store that will cache incremental computations.

type 'key t
val map_based__store_forever : ('key, _) Core.Comparator.Module.t -> 'key t

Use a map as a backend, never remove from cache

val none : 'key t

Don't memoize. Behaves identically to Incr.bind

val hash_based__lru : max_size:int -> (module Core.Hashtbl.Key_plain with type t = 'key) -> 'key t

Use a hash table as a backend, evict the computation for the 'key that has been least recently accessed.

val alist_based__lru : equal:('key -> 'key -> bool) -> max_size:int -> 'key t

Use an alist as a backend, evict the computation for the 'key that has been least recently accessed. Operations to access the memoized computation are O(max_size) on each change in 'key.

val with_hooks : 'key t -> if_found:('key -> unit) -> if_added:('key -> unit) -> 'key t

Wraps another _ t, and calls the provided functions every time a value is found in or added to the cache. You can use this to log or record statistics about how much benefit you're getting from memoization.

OCaml

Innovation. Community. Security.