Note. File hashes performed by this module are
val create :
?hash_fun:(module B0_std.Hash.T) -> B00.File_cache.t -> t
create ~clock ~hash_fun cis an operation cache with
cthe file cache used to memoize build operations
hash_funthe hash function used to hash files and build operations; defaults to
clockthe clock used to measure file hashing time and timestamp revived operations defaults to
val set_op_hash :
t -> B00.Op.t -> (unit, string) Pervasives.result
set_op_hash t ohashes the operation
oand stores the result in
B00.Op.set_hash. Errors if an input file of the operation can't be hashed.
val revive :
B00.Op.t -> (B0_std.Fpath.t list option, string) Pervasives.result
revive c otries to revive operation
ofrom the file cache using the key
Op.hash o. In particular this:
o's execution information using the metadata hunk of the key. For example for spawn operations this also recovers the exit status code and standard output redirection contents into
B00.File_cache.revive; in particular in case of
Ok Nonethe key nothing was revived.
val add :
t -> B00.Op.t -> (bool, string) Pervasives.result
add c oadds operation
oto the cache. This associates the
oto the key
Op.hash oand stores execution information of
oin the key's metadata hunk. The semantics of the result is like
B00.File_cache.add; in particular in case of
Ok falseit means some file in the set of writes do not exist and is likely an error.
val hash_fun :
t -> (module B0_std.Hash.T)
hash_fun cis the hash function used by the operation cache.
val file_hashes :
t -> B0_std.Hash.t B0_std.Fpath.Map.t
file_hashes cis a map of the files that were hashed.
val file_hash_dur :
t -> B0_std.Time.span
file_hash_dur cis the time spent hashing files.