Skip to content

Five entries in data/ are caches derived from other files: ZONES, SPANS, TIERHEAT, cache.hot and rcache/. They speed up opening and reading, and nothing depends on them for correctness.

An unknown or unreadable cache file is ignored and rebuilt. It is never migrated (SPEC V454). A cache that fails to open, or whose magic is unknown to the build, is treated as absent. Unknown means rebuilt, see Artifact version numbers.

  • All of them are sealed whole with a fixed AAD and the current data key, see Seal trailer.
  • All are written to <name>.tmp and renamed over the final name. The *.tmp files are transient staging.
  • ZONES and SPANS entries name data files by id, size and entry count, and an entry whose size or entry count differs from the live file is dropped. TIERHEAT and cache.hot entries name files by id only; ids that are not live are ignored.
  • A file with bytes left over after the last counted item, or with an unknown flag byte, is ignored as a whole.
File Magic AAD
ZONES stzones2, or stzones1 (no held-value sets) "stc-zone-seed"
SPANS stspans1 "stc-span-seed"
TIERHEAT STH1 "stc-tier-heat"
cache.hot SWM1 "stc-warm-v1" ‖ 5 × 0x00
rcache/index SRC1 "stc-rcache-index"

The current magics are the “Derived caches” row of Artifact version numbers: stzones2, stspans1, STH1, SWM1, SRC1.