CacheKit Docs

High-performance cache policies and supporting data structures.

View the Project on GitHub OxidizeLabs/cachekit

HashMap store

This store module is implemented in cachekit::store::hashmap and provides HashMap-backed stores with entry-count capacity enforcement.

Architecture

Key Components

Core Operations

Performance Trade-offs

When to Use

Example Usage

use std::sync::Arc;

use cachekit::store::hashmap::HashMapStore;
use cachekit::store::traits::StoreMut;

let mut store: HashMapStore<u64, String> = HashMapStore::new(2);
store.try_insert(1, Arc::new("a".to_string())).unwrap();
assert!(store.contains(&1));

Type Constraints

Thread Safety

Implementation Notes