Skip to content

Glob Metadata Cache

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

Glob Metadata Cache

The glob metadata cache is an in-memory cache for glob pattern expansion results. It lasts for one Beez process (one CLI invocation).

Purpose

Expanding globs like src/**/*.cpp can be expensive in large trees. Beez may expand the same patterns many times per run:

  • Step cache input collection
  • Success cache file lists via ctx.glob()
  • Output resolution after steps complete

The metadata cache stores (pattern, project_root) -> [matching paths] for the duration of the run.

Configuration

performance = {
    cache_fs_metadata = true,  -- default
}

When false, every glob expansion hits the filesystem fresh.

Scope

Property Value
Persistence None (cleared when beez exits)
Shared across steps Yes, within one run
Affected by --no-cache No (this is not step/success cache)

Disabling cache_fs_metadata does not disable step or success cache. It only removes this per-run optimization.

When to disable

Situation Suggestion
Debugging glob behavior cache_fs_metadata = false
Files created mid-run outside Beez Rare edge case; disable if stale glob results appear
Normal use Leave enabled

Relation to step cache

Step cache uses file content hashes and mtime/size stamps for invalidation. Glob metadata cache only avoids repeated directory walks. It does not cause stale step cache hits on its own.

Next steps

Clone this wiki locally