Module Cache.ClientSource

Sourcetype t
Sourceval set_build_dir : t -> Stdune.Path.t -> t

Set the absolute path to the build directory for interpreting relative paths when promoting files.

Sourceval with_repositories : t -> Cache__.Cache_intf.repository list -> t

Set all the version controlled repositories in the workspace to be referred to when promoting files.

Sourceval promote : t -> (Stdune.Path.Build.t * Stdune.Digest.t) list -> Key.t -> Stdune.Sexp.t list -> repository:int option -> duplication:Cache__.Cache_intf.Duplication_mode.t option -> (unit, string) Stdune.Result.t

Promote files produced by a build rule into the cache.

Find a build rule in the cache by its key.

Sourceval retrieve : t -> Cache__.Cache_intf.File.t -> Stdune.Path.t

Materialise a cached file in the build directory (using Copy or Hardlink as per the duplication mode) and return the path to it.

Sourceval deduplicate : t -> Cache__.Cache_intf.File.t -> unit

Deduplicate a file, i.e. replace the file in_the_build_directory with a hardlink to the one in_the_cache if the deduplication mode is set to Hardlink (or do nothing if the mode is Copy).

Sourceval teardown : t -> unit

Remove the local cache and disconnect with a distributed cache client if any.

Sourceval make : ?finally:(unit -> unit) -> ?duplication_mode:Cache__.Cache_intf.Duplication_mode.t -> command_handler:(Cache__.Cache_intf.command -> unit) -> unit -> (t, exn) Stdune.Result.t