Registry / utility / clru
library0.6.3rscratesunverified

An LRU cache implementation with constant time operations and weighted semantic

# Cargo.toml [dependencies] clru = "0.6.3"
INSTALL
IMPORT
SIG · CLRU
C
clru
utilityrustv0.6.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CLruCache
use clru::CLruCache;

Creates an LRU cache with capacity 2 and inserts a key-value pair.

use clru::CLruCache; fn main() { let mut cache: CLruCache<&str, i32> = CLruCache::new(2).unwrap(); cache.put("one", 1); println!("Cached value: {:?}", cache.get(&"one")); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.6.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
8
Resources
clru — cargo add clru · libregistry