Thanks to visit codestin.com
Credit goes to github.com

Skip to content

kressnick25/memo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

memo

memo caches the stdout of other command-line programs. This is useful if you run a CLI program that takes a while to execute, but the result does not change very often.

Usage

memo <program to run> <program args>

For example:

memo 'echo "scale=2000; 4*a(1)" | bc -l'

This will compute pi to 2000 places the first time it runs. After memo has cached the result, subsequent runs will return instantaneously.

Extra

  • Default cache TTL is 3600 seconds (1 hour). Customize with -t or --ttl:
memo --ttl=24h my-command
  • Clear the memo cache by passing the --clear=true flag:
memo --clear=true
  • Enable debug logs by setting MEMO_DEBUG environment variable to true or 1.

Building

To build from source, clone this repo and run:

go build .

or grab the latest Release binaries from Github.

License

MIT License

Disclaimer

README generated by AI

About

Cache the output of any CLI command

Resources

License

Stars

Watchers

Forks