https://github.com/make-github-pseudonymous-again/memoize
:floppy_disk: Cache executable calls
https://github.com/make-github-pseudonymous-again/memoize
agpl caching executable memoization memoize shell-scripts
Last synced: 3 months ago
JSON representation
:floppy_disk: Cache executable calls
- Host: GitHub
- URL: https://github.com/make-github-pseudonymous-again/memoize
- Owner: make-github-pseudonymous-again
- License: agpl-3.0
- Created: 2017-04-09T20:35:19.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2025-05-11T22:55:26.000Z (5 months ago)
- Last Synced: 2025-05-11T23:26:38.609Z (5 months ago)
- Topics: agpl, caching, executable, memoization, memoize, shell-scripts
- Language: Rust
- Homepage: https://github.com/make-github-pseudonymous-again/memoize
- Size: 99.6 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
:floppy_disk: memoize
[](https://raw.githubusercontent.com/make-github-pseudonymous-again/memoize/main/LICENSE)
[](https://github.com/make-github-pseudonymous-again/memoize/actions/workflows/ci:test.yml?query=branch:main)
[](https://codecov.io/gh/make-github-pseudonymous-again/memoize)
==Cache executable calls.
## :minidisc: Install [](https://aur.archlinux.org/packages/memoize)
```sh
make DESTDIR=/ PREFIX=/usr install
```## :woman_astronaut: Usage
```shell
$ cat fib
n="$1"
if [ "$n" -eq 0 ] ; then echo 0
elif [ "$n" -eq 1 ] ; then echo 1
else
a="$(MEMOIZE_CACHE="/tmp/${USER}-memoize" memoize 9999 sh fib $((n-1)))"
b="$(MEMOIZE_CACHE="/tmp/${USER}-memoize" memoize 9999 sh fib $((n-2)))"
echo "$a + $b" | bc
fi
$ sh fib 100
354224848179261915075
$ sh fib 200
280571172992510140037611932413038677189525
```