-
Notifications
You must be signed in to change notification settings - Fork 0
Caching Troubleshooting
Common cache-related symptoms and how to fix them.
Check artifact patterns
-- NOT cacheable:
step({ name = "x", phase = "p", scope = "s", run = "make" })
-- Cacheable:
step({ name = "x", phase = "p", scope = "s", input = { "src/**" }, output = { "build/app" }, run = "make" })Check outputs exist
Step cache requires all recorded outputs on disk. If the binary is deleted, the step runs again.
Check --no-cache
beez build --no-cache # intentional bypassCheck config
beez --show-config # cache.enabled should be trueStale index with wrong assumptions
Clear cache:
beez --clean-cache buildInput globs too narrow
If a dependency file is not matched by input or mutate, changing it will not invalidate the step. Widen globs or add explicit patterns.
Env var not in hash_vars
Toolchain change invisible to cache. Add vars to env.hash_vars.
Lua callback steps fingerprint build.lua, not the callback body inline. Editing build.lua should invalidate. If you generate build.lua externally, ensure the file on disk updates.
API not called
Success cache is opt-in. You must call ctx.file_success_cached() before work and ctx.cache_file_success() after success.
Config revision
Bump lint_rev (or similar) only when tooling changes, not on every edit.
get_cache_misses confusion
get_cache_misses() returns failures from the previous run at session start, not live state mid-loop.
file_success_cached compares file content hash and include tree. If it still hits:
- Confirm
--no-cacheis off - Delete
.cache/success/entries/for that step - Check that the path passed to the API matches the path from
ctx.glob()(relative, forward slashes)
Expected: record_file_cache_miss adds paths to the misses file. Next run re-checks listed paths via get_cache_misses(). Other files can still skip if cached.
To force full re-lint:
beez --clean-cacheOr delete .cache/success/misses/<step>.misses.
- Run
beez --updateafter switching compression togzipwithmode = always - Delete
.cache/periodically in CI with a retention policy - Success cache creates one manifest per cached file; very large projects may need occasional cleanup
Symptoms: errors mentioning cache file read/write.
beez --clean-cacheIf compression settings changed radically, try beez --update first.
Not a cache bug: overlapping mutate without proper order(). See Order Declaration and Parallel Execution and Dependencies.
-
beez --show-config- cache enabled, path, hash settings -
beez build --verbose- look for cache hit lines (unlesshide_cache_hits) - Inspect
.cache/index/for the step's index file - Run with
--no-cacheto confirm behavior without cache - Run with
performance.cache_fs_metadata = falseto rule out glob caching quirks
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