1.1.4 • Published 2 months ago

joshuapro v1.1.4

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

Build Status

tcache

tcache is a command line tool for caching directory trees or files. An example usecase would be a build/continuous integration system where on each build application dependencies need to be setup consuming considerable time and quite often depending on the network or external repositories being available and not banning users for abuse.

Example use case

In the following example, the command pip install -r requirements.txt will be executed only if one of the following conditions is true:

  • It is the first time you run the command, thus the env directory doesn't exist yet
  • The contents of requirements.txt have changed since the last time the command was run and env doesn't exist anymore, or -f is provided.
  • The cached version of env is older than 1 day since the command was run and env doesn't exist anymore, or -f is provided.
    $ tcache -p env -k $(md5 -q requirements.txt) -r 1d -- pip install -r requirements.txt --root=env

Here is a similar example, but for npm:

    $ tcache -p ./node_modules -k $(md5 -q package.json) -- npm install
   
    

By default cached directory trees are stored in $HOME/.tcache, this can be changed with the -c option.

Please, run tcache --help for further details and usage examples.

1.1.4

2 months ago

1.1.3

2 months ago

1.1.2

2 months ago