Bincache is a command-line utility designed to cache the output of executable binaries and shell commands.
pip install bincache
Execute commands through bincache to cache their output.
bincache <binary_or_command> <arg1> [arg2 ... argN]
Cache the output of the date command:
bincache date
Cache the output of a binary executable:
bincache ./a.out -l -a
Bincache can be configured using a configuration file bincache.conf
. The default configuration file is expected to be located at $HOME/.cache/bincache/bincache.conf
.
max_size
: Maximum cache size (e.g., 5G for 5 Gigabytes), default5G
log_file
: Path to the log file, default emptylog_level
: Logging level (INFO, DEBUG, WARNING, ERROR, CRITICAL), defaultINFO
stats
: Enable or disable statistics, defaultfalse
Example bincache.conf:
max_size = 5G
log_file = /var/log/bincache.log
log_level = INFO
stats = false
Environment Variables
BINCACHE_DIR
: Override the default cache directory.
To contribute to Bincache, fork the repository, make your changes, and create a pull request. Please ensure that your changes are well-tested by run pytest
.
Bincache is licensed under the MIT License. See the LICENSE
file for more information.