package datakit-ci

  1. Overview
  2. Docs

Parameters

module B : BUILDER

Signature

type t

A t is a cache of values created by B.

val create : logs:Live_log.manager -> B.t -> t

create ~logs b is a fresh cache that maps keys of type B.Key.t to values of type B.value.

val lookup : t -> (unit -> DK.t Lwt.t) -> B.context -> B.Key.t -> B.value status Lwt.t

lookup t conn ~rebuild ctx key returns the cached value of key, or uses B.generate ctx key to start the process of calculating the value if this is the first time key has been requested. If rebuild is true then any complete cached result is ignored (we mark the result branch as needing a rebuild and build again anyway).

val find : t -> B.context -> B.Key.t -> B.value Term.t

find t key is the terms which evaluates to the result of looking up key in the cache (using lookup).

OCaml

Innovation. Community. Security.