pub type BlobSchemaCache = FxHashMap<(Oid, String), ObjectId>;Expand description
Cache mapping a (git blob OID, protocol) pair to the
content-addressed ObjectId of the FileSchemaObject
produced by parsing it.
Keying on the protocol avoids a cross-protocol collision: the
same bytes appearing as a.py and a.txt parse to different
per-file schemas and therefore must hash to different
ObjectIds, which means they must occupy different cache
slots.
A BlobSchemaCache is the key to making incremental tree-based
imports cheap: when a new git commit only changes one file, every
other (blob, protocol) pair is already in the cache, so the
importer reuses the existing ObjectId and only has to rewrite
the tree-node objects on the path from the changed file to the
project root.
Aliased Type§
pub struct BlobSchemaCache { /* private fields */ }