Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Workspace Layout

HydraCache is split into focused crates so applications can depend only on the surfaces they use.

PathPurpose
crates/hydracache-coreCore public types: keys, tags, options, stats, diagnostics, codec, and errors.
crates/hydracacheUser-facing local cache runtime, typed cache, single-flight, tag index, diagnostics, invalidation bus, and client/member cluster API.
crates/hydracache-dbDatabase-neutral query result-cache adapter API.
crates/hydracache-sqlxSQLx-facing integration crate and helper methods.
crates/hydracache-dieselDiesel-facing integration crate and helper methods.
crates/hydracache-seaormSeaORM-facing integration crate and helper methods.
crates/hydracache-macrosProcedural macros such as cacheable_loader!, cacheable_infallible!, HydraCacheEntity, and query_cache_policy!.
crates/hydracache-observabilityFramework-neutral cache registry and serializable diagnostic snapshots.
crates/hydracache-actuator-axumOptional read-only Axum actuator routes.
crates/hydracache-cluster-chitchatOptional real chitchat-backed cluster discovery adapter.
crates/hydracache-cluster-raftOptional real raft-rs metadata control-plane runtime.
crates/hydracache-clusterOptional composition helpers for the standard chitchat plus raft cluster setup.
crates/hydracache-cluster-transport-axumOptional Axum/HTTP peer-fetch transport and read-through near-cache hydration.
crates/hydracache-sandboxNon-published manual backend for actuator, database, listener, scenario, and cluster checks.

The hydracache crate keeps public API re-exports in src/lib.rs and splits runtime code into focused modules:

ModulePurpose
cache.rsHydraCache runtime API.
builder.rsLocal cache builder.
typed.rsTypedCache<T> namespaced view.
cluster.rsClient/member cluster roles, in-memory discovery, cluster model, generation guard, and diagnostics.