Expand description
§Memory Storage - redb
redb embedded database for fast cache layer.
This crate provides:
- High-performance key-value storage using redb
- Zero-copy reads for fast retrieval
- Async wrappers for synchronous redb operations
- Episode and pattern caching
- Bincode serialization for efficient storage
§Example
use do_memory_storage_redb::RedbStorage;
use std::path::Path;
let storage = RedbStorage::new(Path::new("./memory.redb")).await?;Structs§
- Adaptive
Cache - Adaptive LRU cache with intelligent TTL adjustment
- Adaptive
Cache Adapter - Adapter that wraps AdaptiveCache for metadata-only caching.
- Adaptive
Cache Config - Configuration for adaptive TTL cache
- Adaptive
Cache Metrics - Metrics specific to adaptive cache performance
- Cache
Config - Configuration for the LRU cache
- Cache
Metrics - Cache performance metrics
- Cache
Persistence - Cache persistence handler
- Cache
Snapshot - Complete cache snapshot
- Incremental
Update - Incremental update record
- LRUCache
- LRU cache with TTL expiration
- Persisted
Cache Entry - A single persisted cache entry
- Persistence
Config - Configuration for cache persistence
- Persistence
Manager - Manager for automatic cache persistence
- Persistence
Stats - Persistence statistics
- Redb
Query - Query options for episodes
- Redb
Storage - redb storage backend for fast caching
- Storage
Statistics - Storage statistics
Enums§
- Persistence
Mode - Persistence mode
- Persistence
Strategy - Persistence strategy
Constants§
- MAX_
EMBEDDING_ SIZE - Maximum size for embedding deserialization (1MB).
- MAX_
EPISODE_ SIZE - Maximum size for episode deserialization (10MB).
- MAX_
HEURISTIC_ SIZE - Maximum size for heuristic deserialization (100KB).
- MAX_
PATTERN_ SIZE - Maximum size for pattern deserialization (1MB).
Traits§
- Cache
- Common cache trait for metadata tracking