Derived caches
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.
Rule: rebuilt, never migrated
Section titled “Rule: rebuilt, never migrated”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.
Common rules
Section titled “Common rules”- All of them are sealed whole with a fixed AAD and the current data key, see Seal trailer.
- All are written to
<name>.tmpand renamed over the final name. The*.tmpfiles are transient staging. ZONESandSPANSentries name data files by id, size and entry count, and an entry whose size or entry count differs from the live file is dropped.TIERHEATandcache.hotentries 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.
Files and magics
Section titled “Files and magics”| 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.