cache: automagically cache and reuse output files
Following commands got support for automating cache and reuse of produced output files:
- make-archive
- get-archive
- srcpkg
- build
Cache uses checksum of current project state as a key and also stores and validates cached files' checksums. Currently the project checksum is obtained using git magicks so the cache is only enabled for projects using git.
Cache lives in pkg/.cache.json
and it's updated automatically when
a new archive/srcpkg/package
is created or when invalid cache entry is
requested.
Caching can be disabled using new --no-cache
option.
Cache can be cleared by removing pkg/.cache.json
file.
Self test on make-archive
is included.