-
Notifications
You must be signed in to change notification settings - Fork 0
Caching Overview
Beez has three separate caching mechanisms. They solve different problems and do not replace each other.
beez build
|
+---------------+---------------+
| | |
Step cache Success cache Glob metadata
(whole step) (per file/key) (per run, RAM)
| | |
.cache/ .cache/success/ in-process
entries/ entries/
index/ misses/
Skips an entire step when nothing relevant changed and declared outputs still exist.
- Applies to steps with at least one of
input,output, ormutate - Works for shell steps and Lua callbacks
- Stores manifests under
.cache/entries/and fast indexes under.cache/index/
Example: a compile step with input = { "src/**/*.cpp" } and output = { "build/app" } runs only when sources change or the binary is missing.
See Step Cache.
Skips individual units of work inside a Lua callback, typically one source file per lint or format run.
- Opt-in via
ctx.file_success_cached()/ctx.cache_file_success()in step callbacks - Stored under
.cache/success/ - Tracks previous failures in
.cache/success/misses/for incremental re-check
Example: lint 500 files, change one, only that file is checked again.
See Success Cache.
Speeds up repeated glob expansion within a single Beez invocation.
- In-memory only (not persisted)
- Enabled by
performance.cache_fs_metadata(defaulttrue) - Shared by step cache, success cache, and
ctx.glob()
See Glob Metadata Cache.
| Not cached by Beez | Notes |
|---|---|
| Steps without artifact patterns | No input / output / mutate
|
| Tasks and workflows themselves | Caching is per step |
| Compiler caches (ccache, sccache) | Separate toolchain feature |
| Arbitrary shell side effects | Only declared artifacts are tracked |
| Method | Effect |
|---|---|
beez --no-cache |
Disables step and success cache for one run |
cache.enabled = false in config |
Disables both persistently |
--dry-run |
Skips cache lookups; does not execute steps |
Default root: .cache/ (configurable via cache.path).
| Path | Purpose |
|---|---|
.cache/entries/ |
Step cache manifests (keyed by content hash) |
.cache/index/ |
Per-step index files for fast lookup |
.cache/success/entries/ |
Success cache manifests |
.cache/success/misses/ |
Per-step failure lists |
.cache/beez-compress.meta |
Compression settings metadata |
.cache/logs/ |
Run logs (not cache data, but colocated) |
Safe to delete the whole .cache/ directory. Beez rebuilds cache entries on the next run.
| Goal | Approach |
|---|---|
| Skip rebuild when sources unchanged | Step cache with input + output
|
| Incremental lint/format/analyze | Success cache in Lua callback |
| Faster glob in large repos | Keep cache_fs_metadata enabled |
| Force full run |
--no-cache or --clean-cache
|
- Artifact Patterns - declare what steps touch
- Cache Keys and Invalidation - when entries go stale
- DSL Patterns - incremental per-file example
Quick Reference · Glossary · FAQ
- Fundamentals
- Core Concepts
- Project Layout
- First Pipeline
- Phases and Scopes
- How Phases and Scopes Work
- Selecting with Phases and Scopes
- Designing Phases and Scopes
- Parallel Execution and Dependencies
- Configuration
- Configuration Overview
- Global User Config
- Project Config
- Environment Variables
- Performance Settings
- Cache Settings
- Config Reference
- CLI
- CLI Overview
- Running Targets
- Filtering by Phase
- Running a Single Step
- Listing Entities
- Output and Logging Flags
- Cache and Maintenance Flags
- Meta and Utility Commands
-
Project Scaffolding —
beez --init(embedded Tempify) - CLI Flag Reference
- Lua DSL
- DSL Overview
- Plugin System — Plugins, Config DSL, Standard-Workflows
- Step Declaration
- Task Declaration
- Workflow Declaration
- Order Declaration
- Configure Step
- ReqPack Declaration
- Beez API
- Step Context
- DSL Patterns
- Caching
- Caching Overview
- Step Cache
- Success Cache
- Glob Metadata Cache
- Artifact Patterns
- Cache Keys and Invalidation
- Cache Storage and Maintenance
- Caching Troubleshooting
- UI and Output
- Output Modes
- Progress and Animation
- Colors and Themes
- Run Summaries
- Logging and Log Files
- Development and Contribution
- Building and Setup
- Repository Layout
- Testing
- Code Quality
- Feature Development Workflow
- Submitting Changes