Skip to content

Cache and Maintenance Flags

Leonard Ramminger edited this page Aug 9, 2026 · 1 revision

Cache and Maintenance Flags

Flags that control Beez caching and on-disk cache maintenance.

--no-cache

Disables step cache and success cache for one run.

beez build --no-cache

Equivalent to setting cache.enabled = false via config for that invocation.

  • Steps always execute (no cache skip)
  • Lua success-cache APIs do not skip files
  • Does not delete existing cache files

--clean-cache

Removes the cache directory (from merged config, default .cache) before the run.

beez --clean-cache
beez --clean-cache build

Behavior:

  1. Loads build.lua and merges config
  2. Deletes the cache root recursively
  3. Prints: Removed Beez cache: <path>
  4. Runs a target only if you also pass one (build, -p, -s, etc.)

beez --clean-cache alone clears cache and exits 0 without executing a workflow.

--update

Recompresses on-disk cache files to match current cache.compress settings.

beez --update
beez --update build

Behavior:

  1. Loads build.lua and merges config
  2. Migrates cache storage (recompression per active algorithm, level, mode)
  3. Prints how many files were updated
  4. Optionally continues to a target if one was given

Use after changing cache.compress in config. Does not invalidate cache keys.

Typical combinations

Situation Command
Force full rebuild beez build --no-cache
Clear stale cache beez --clean-cache build
After compression config change beez --update
CI clean slate beez --clean-cache && beez ci

Related config

Persistent cache settings: Cache Settings and Configuration.

Caching behavior: Caching Overview.

Next steps

Clone this wiki locally