Expand description
The meta cache, and the one way into it.
A hash is a claim about the bytes it keys. Caching bytes that do not hash to
their key stores a lie the rest of the crate reads back as truth, and
cas.md puts the check at exactly this point - “before the content is
stored under the hash” - so everything downstream can stop asking.
Keeping that as a convention did not hold. The map was a bare HashMap
field on Store, so any method could reach past the check, and several did:
update shipped without it, search_deployer, set_deployer and
set_deployer_from_query_response each wrote to the cache directly. Each
was found separately, after the fact.
So the map lives here with a private field and no unguarded insert. Every write goes through MetaCache::insert_verified because the type system offers nothing else, including from code written long after this.
Structs§
- Meta
Cache - Meta bytes keyed by their own keccak256 hash.