GithubHelp home page GithubHelp logo

gencache's Introduction

gencache

General caching script

usage: gencache.py [-h] --command COMMAND --source SOURCE [SOURCE ...] --build
                   BUILD --cache CACHE [--maxcache [MAXCACHE]]
                   [--verbose [VERBOSE]]

  -h, --help            show this help message and exit
  --command COMMAND     'fetch' to fetch from the cache, 'store' to store.
  --source SOURCE [SOURCE ...]
                        Path to the source code directory (or directories)
                        that generate the build.
  --build BUILD         Path to the output dir of the build.
  --cache CACHE         Path to the cache directory.
  --maxcache [MAXCACHE]
                        Size limit for the cache directory in GB.
  --verbose [VERBOSE]   Verbose output.

Example usage:

python gencache.py --command fetch --source c:\lib_repo\my_sources --build c:\lib_repo\build_output_dir --cache c:\my_cache_dir
if !errorlevel! equ 0 (
    echo Fetched from cache.
    exit /b 0
)
echo Not in cache so build
c:\lib_repo\my_sources\build.bat --output c:\lib_repo\build_output_dir

rem Store in the cache
python gencache.py --command store --source c:\lib_repo\my_sources --build c:\lib_repo\build_output_dir --cache c:\my_cache_dir

If after storing the cache exceeds the max cache size it will delete the least recently fetched directories in the cache one at a time until the size is under the max.

Note you can pass multiple directories to --source

gencache's People

Contributors

phraemer avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.