Comments (1)
Obvious notes
- Caching applies only to templates that we fetch from remotes.
- Cached templates are stored as tarballs.
Cache directory locations
- Linux/macOS:
$HOME/.cache/arx
. - Windows:
%localappdata%/arx/.cache
or%userprofile%/AppData/Local/arx/.cache
.
Structure
$ARX_CACHE_DIR
└── manifest.toml
└── tarballs
├── <hash>.tar.gz
├── <hash>.tar.gz
└── <hash>.tar.gz
Manifest
[[templates.<entry>.items]]
timestamp = <timestamp>
hash = <hash>
This means that every cache entry (encoded combination of host, user name and repository name) may have many tarballs associated with it. Why? Well, for instance, we may first scaffold from a template using the following source string:
github:user/repo#dev
After a while the tip of that dev
branch may advance, e.g. new commits can be pushed, it can be rebased, force-pushed, and so on. So if we try to scaffold again using the same source string after the branch was updated, we have two options: overwrite the existing cached tarball with a new one or download new and keep both. The latter option is non-destructive and enables "history", allowing one to use different cached tarballs.
Notes:
<entry>
- Base 321 encoded source string in the form of:<host>:<user>/<repo>
.<timestamp>
- Unix timestamp in millis. Used for selecting ref.<hash>
- SHA-256 hash of the ref, either short of full (7-40 chars). Used in filenames.
Commands (optional)
Add subcommands for manipulating cache:
arx cache list
: list all cached templates.arx cache update
: try to refetch and update specified cached templates.arx cache remove
: remove specified cached templates.
Footnotes
from arx.
Related Issues (14)
- feat: allow to specify config name/path
- feat: allow to restrict on which OSes actions allowed to run HOT 1
- fix: do not try to process replacements on binary files HOT 1
- feat: allow to use local repositories HOT 3
- feat: allow to specify subdirectory as source
- feat: mvp
- feat: implement conditional execution of actions HOT 1
- feat: allow to use git-less local templates
- feat: cleanup on failures
- fix: warn on unknown injects
- feat: report which replacements were actually performed
- refactor: look into using `ripgrep` crates
- feat: add output verbosity control/levels
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arx.