Expand description
CacheKit — production-ready caching for Rust.
Supports cachekit.io SaaS, Redis, and Cloudflare Workers backends. Zero-knowledge encryption via AES-256-GCM with HKDF key derivation.
Re-exports§
pub use client::CacheKit;pub use client::CacheKitBuilder;pub use config::CachekitConfig;pub use error::BackendError;pub use error::BackendErrorKind;pub use error::CachekitError;pub use client::SecureCache;pub use encryption::EncryptionLayer;
Modules§
- backend
- Pluggable cache backend trait and implementations (CachekitIO, Redis, Workers).
- client
- High-level cache client with dual-layer (L1/L2) support.
- config
- Configuration types and environment variable parsing.
- encryption
- Client-side AES-256-GCM encryption with HKDF key derivation. Zero-knowledge encryption layer using AES-256-GCM with AAD v0x03 format.
- error
- Error types for cache operations and backend communication.
- key
- Cache key generation using Blake2b hashing.
- l1
- In-process L1 cache backed by
mokawith per-entry TTL. - metrics
- L1 cache hit-rate metrics for CachekitIO request headers.
- prelude
- Convenient glob import for the most common types.
- serializer
- Serialization and deserialization of cached values via MessagePack.
- session
- SDK session tracking (session ID and start timestamp).
- url_
validator - SSRF-safe URL validation for CachekitIO endpoints.