Registry / database / bitcoinleveldb-cache

bitcoinleveldb-cache

JSON →
library0.1.19rscratesunverified

Provides a low-level, Bitcoin Core–compatible in-memory cache for LevelDB-style storage with LRU eviction and memory accounting.

# Cargo.toml [dependencies] bitcoinleveldb-cache = "0.1.19"
INSTALL
IMPORT
SIG · BITCOINLEVELDB-CAC
B
bitcoinleveldb-cache
databaserustv0.1.19
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.

LruCache
use bitcoinleveldb_cache::LruCache;

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

use bitcoinleveldb_cache::LruCache; fn main() { let mut cache = LruCache::new(100); // capacity in entries cache.insert(b"key", b"value"); println!("Cache entry inserted"); }
Debug
Known issues
gotchaMemory accounting is explicit; forgetting to charge memory for large values can cause unbounded growth.
fix
Use `charge` method to account for memory usage of inserted values.
affects: >=0.1.0
Upgrade
Version history
0.1.19latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
14 hits · last 30 days
node
12
OpenAI (training)
1
Resources
bitcoinleveldb-cache — cargo add bitcoinleveldb-cache · libregistry