Skip to main content

Crate aster_forge_cache

Crate aster_forge_cache 

Source
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§

CacheConfig
Configuration used to construct a cache backend.
CacheHealthComponent
Runtime component that registers the standard cache diagnostics check.
MemoryCache
In-process cache backend backed by moka.
RedisCache
Redis cache backend with a short-lived local memory fallback.

Enums§

CacheError
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§

CacheBackend
Object-safe cache backend trait that exposes a common byte-oriented API.
CacheExt
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.