asv.build_cache

Classes

BuildCache

Build cache

Module Contents

class asv.build_cache.BuildCache(conf, root)[source]

Build cache

Data is cached in a directory tree:

{self._path}/
    {self._path}/{commit_hash}/*
    {self._path}/{commit_hash}.timestamp

If the timestamp file is missing, the subdirectory is ignored (and subject to cleanup).

The cache cleanup retains the latest build_cache_size items that have a valid timestamp file.

The timestamp files are created by self.finalize_cache_dir(commmit_hash), which also triggers a cache cleanup.

The finalization should be called only after package is installed successfully, keeping in mind that build_cache_size may be 0.

_root[source]
_path[source]
_cache_size[source]
_get_cache_dir(commit_hash)[source]

Get the cache dir and timestamp file corresponding to a given commit hash.

_remove_cache_dir(commit_hash)[source]
_get_cache_contents()[source]

Return list of commit hash directories in the cache (containing wheels or not), sorted by decreasing timestamp

_cleanup_build_cache()[source]
get_cache_dir(commit_hash)[source]
create_cache_dir(commit_hash)[source]
finalize_cache_dir(commit_hash)[source]