Run command with caching.
When cache exists, replay by cache. When cache doesn't exist, run command and cache it.
Cache key can be generated with these way:
- Command
- File content (path and content)
- Environment variable (name and value)
- Text
$ cmd_cache --file depedingfile.go --env GOPATH -- go build
cmd_cache
Usage:
cmd_cache [--cache-directory=DIRECTORY] [(--file FILE | --env ENV | --text TEXT)...] -- [COMMAND...]
cmd_cache (--help | --version)
Arguments:
FILE depending file. (e.g. prog.h)
ENV depending environment variable. (e.g. LD_LIBRARY_PATH)
TEXT text affecting command.
COMMAND real command.
Options:
-h --help Show this screen.
-V --version Show version.
--cache-directory=DIRECTORY Cache directory [default: .cmd_cache]
$ go get -d ./...
$ go build
The 3-Clause BSD License. See also LICENSE file.