Expand description
VecCache maintains a mapping from K -> (V, I) pairing. K and I must be roughly u32-sized, and V must be Copy.
VecCache supports efficient concurrent put/get across the key space, with write-once semantics (i.e., a given key can only be put once). Subsequent puts will panic.
This is currently used for query caching.
Structsยง
- Slot ๐
- SlotIndex ๐
- This uniquely identifies a single Slot<V>entry in the buckets map, and provides accessors for either getting the value or putting a value.
- VecCache
- In-memory cache for queries whose keys are densely-numbered IDs
(e.g CrateNum,LocalDefId), and can therefore be used as indices into a dense vector of cached values.
Constantsยง
- ENTRIES_BY_ ๐BUCKET