mkcache
v2019.6.8
Published
make cache file. inspired by 'mktemp'
Downloads
2
Readme
make cache file. inspired by 'mktemp'
Installation
$ [sudo] npm i -g mkcache
How it works
$XDG_CACHE_HOME/mkcache/<hash>
Config
export MKCACHE=path/to/cache # ~/.cache/mkcache by default
Scripts usage
command|usage
-|-
mkcache
|usage: mkcache args ...
Examples
example 1. speed up macOS tts with mkcache:
path="$(mkcache "$@")"
! [ -e "$path" ] && /usr/bin/say "$@" -o "$path"
afplay "$path"
example 2. execute script once:
path="$(mkcache script "$@")"
! [ -e "$path" ] && { script "$@" || exit; touch "$path"; }