package dune-private-libs
Module type Cache.CacheSource
val set_build_dir : t -> Stdune.Path.t -> tSet the absolute path to the build directory for interpreting relative paths when promoting files.
val with_repositories : t -> repository list -> tSet all the version controlled repositories in the workspace to be referred to when promoting files.
val promote :
t ->
(Stdune.Path.Build.t * Stdune.Digest.t) list ->
Key.t ->
metadata ->
repository:int option ->
duplication:Duplication_mode.t option ->
(unit, string) Stdune.Result.tPromote files produced by a build rule into the cache.
val search : t -> Key.t -> (metadata * File.t list, string) Stdune.Result.tFind a build rule in the cache by its key.
val retrieve : t -> File.t -> Stdune.Path.tMaterialise a cached file in the build directory (using Copy or Hardlink as per the duplication mode) and return the path to it.
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).
val teardown : t -> unitRemove the local cache and disconnect with a distributed cache client if any.