package logtk

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type 'a t
type key = t
val create : int -> 'a t

Create a new cache of the given size.

val clear : 'a t -> unit

Clear content of the cache

val with_cache : 'a t -> (key -> 'a) -> key -> 'a

Wrap the function with the cache

val with_cache_rec : 'a t -> ((key -> 'a) -> key -> 'a) -> key -> 'a

Partially apply the given function with a cached version of itself. It returns the specialized function.

OCaml

Innovation. Community. Security.