WeftKitMem
In-Memory Cache
Ultra-fast in-memory cache with lock-free hash maps, configurable eviction policies, optional persistence snapshots, pub/sub, and atomic counters.
p99 point read (single-process)
Key Features
What makes WeftKitMem stand out.
Lock-Free Data Structures
Concurrent lock-free hash maps for maximum multi-core throughput. Up to 20M+ ops/sec on 8 threads.
Configurable Eviction Policies
LRU (Least Recently Used), LFU (Least Frequently Used), ARC (Adaptive Replacement Cache). Hard memory bounds with no silent OOM.
Pub/Sub Messaging
Channel-based publish/subscribe with pattern matching. Ordered delivery within channels. Backpressure-aware subscriber queues.
Atomic Operations
INCR, DECR, atomic CAS, compare-and-swap, bit operations. Transactional batches with rollback semantics.
Optional Persistence
Snapshot-to-disk for warm restart. Background write to WAL. RDB-compatible snapshot format.
Rich Data Types
Strings, lists, sets, sorted sets, hashes, bit arrays, streams, and HyperLogLog. Redis-compatible API.
Performance Targets
Real numbers from Criterion benchmarks on reference hardware.
Wire Protocol
WeftKitMem supports the Redis RESP3 protocol. Your existing tools just work.
Get Started in Seconds
Add WeftKitMem to your Rust project and start querying.
use weftkitmem::prelude::*;
// Open or create a database
let db = Database::open("my_app.db")?;
// Use the module API
let result = db.query("SELECT * FROM users WHERE active = true")?;
for row in result.rows() {
println!("{:?}", row);
}Where to Use It
Application-level caching
Real-time leaderboards and counters
Session state management