Expand description
Shared cache abstractions and backend constructors for Aster services.
The public API is byte-oriented so cache backends can remain object-safe and easy to wrap in
Arc<dyn CacheBackend>. JSON convenience methods are provided as an extension trait for common
application values, while concrete memory and Redis implementations live behind feature-gated
modules.
Modules§
- bloom
- Concurrent Bloom-filter primitives for cache-aside existence checks.
Structs§
- Cache
Config - Configuration used to construct a cache backend.
- Cache
Health Component - Runtime component that registers the standard cache diagnostics check.
- Memory
Cache - In-process cache backend backed by
moka. - Redis
Cache - Redis cache backend with a short-lived local memory fallback.
Enums§
- Cache
Error - Errors returned by cache construction and health checks.
Constants§
- CACHE_
COMPONENT - Stable component name used for cache diagnostics.
- CACHE_
HEALTH_ CHECK - Stable health check name used for cache diagnostics.
- CACHE_
HEALTH_ CHECK_ TIMEOUT - Default timeout for cache diagnostics checks.
Traits§
- Cache
Backend - Object-safe cache backend trait that exposes a common byte-oriented API.
- Cache
Ext - Convenience methods for JSON serialization and deserialization.
Functions§
- cache_
health_ component - Creates the standard cache diagnostics health component.
- cache_
health_ options - Returns the standard cache health check options.
- check_
cache_ component - Runs the standard cache backend health check.
- create_
cache - Creates a cache backend from configuration.
Type Aliases§
- Result
- Result type returned by cache operations.