CacheKit Docs

High-performance cache policies and supporting data structures.

View the Project on GitHub OxidizeLabs/cachekit

Handle store

This store module is implemented in cachekit::store::handle and provides a store keyed by compact handles (IDs) instead of full keys. It’s intended to be used alongside a KeyInterner (or any other handle allocator) so that policy metadata never has to clone large keys.

Architecture

Key Components

Core Operations

Performance Trade-offs

When to Use

Example Usage

use std::sync::Arc;

use cachekit::ds::KeyInterner;
use cachekit::store::handle::HandleStore;
use cachekit::store::traits::StoreMut;

let mut interner = KeyInterner::new();
let handle = interner.intern("alpha".to_string());

let mut store: HandleStore<_, String> = HandleStore::new(2);
store.try_insert(handle, Arc::new("value".to_string())).unwrap();

Type Constraints

Thread Safety

Implementation Notes