Legend:
Library
Module
Module type
Parameter
Class
Class type
Store builds results using XFS with the reflink feature.
XFS is intended to behave consistently as it scales to large storage and many files, modern-day XFS was originally from SGI Irix. This store uses the reflink feature in XFS to share blocks between files, to support fast snapshots of directory trees and deduplicate file data for more efficient use of storage hardware.
build t ~id fn runs fn tmpdir to add a new item to the store under key id. On success, tmpdir is saved as id, which can be used as the base for further builds, until it is expired from the cache. On failure, nothing is recorded and calling build again will make another attempt at building it. The builder will not request concurrent builds for the same id (it will handle that itself). It will also not ask for a build that already exists (i.e. for which result returns a path).
cache ~user t name creates a writeable copy of the latest snapshot of the cache name. It returns the path of this fresh copy and a function which must be called to free it when done. If the cache name does not exist, it is first created (as an empty directory, and owned by user). When the copy is released, it is snapshotted to become the new latest version of the cache, unless the cache has already been updated since it was snapshotted, in which case this writeable copy is simply discarded.
val delete_cache : t->string ->(unit, [> `Busy ])Lwt_result.t
delete_cache t name removes the cache name, if present. If the cache is currently in use, the store may instead return Error `Busy.