reflex-cache 0.2.2

Episodic memory and high-speed semantic cache for LLM responses
Documentation
1
2
3
4
5
6
7
8
use crate::storage::error::StorageError;
use crate::storage::mmap::MmapFileHandle;

/// Writes opaque bytes to storage and returns a readable mmap handle.
pub trait StorageWriter: Send + Sync {
    /// Writes `data` under `key`.
    fn write(&self, key: &str, data: &[u8]) -> Result<MmapFileHandle, StorageError>;
}