Skip to main content

Module cache

Module cache 

Source
Expand description

haz cache subcommands per CACHE-021 / CACHE-022 / AUX-017..AUX-027.

  • clear backs haz cache clear: an unconditional reset of <workspace_root>/.haz/cache. Subsequent lookups against the same workspace are misses until new entries are stored.
  • clean backs haz cache clean [--soft] [--max-age <D>] [--max-size <B>] [--dry-run]: composable reclamation of objectively-stale entries plus age- / size-bounded eviction (CACHE-022, AUX-022..AUX-027). The executor merges CLI flags with workspace cache.clean.* defaults (AUX-025) and enforces the “at least one mode” rule (AUX-022).
  • info backs haz cache info: a read-only walk that classifies entries and reports counts, total bytes, and schema-prefix breakdown without mutating the cache root.

All three subcommands first load the workspace via crate::workspace_load::load_workspace to locate the workspace root. The cache subcommand surface is independent of the bearing-project concept (EXEC-022) and ignores cwd beyond using it as the discovery starting point. A future revision MAY expose a discovery-only fast path so the cache commands succeed against a workspace with broken haz.yml files; for v1, a parseable workspace is required.

Functions§

clean
Execute haz cache clean against cwd with the supplied CLI args.
clear
Execute haz cache clear against cwd.
info
Execute haz cache info against cwd.