Skip to content

HydraCache 0.35.0

Choose a tag to compare

@github-actions github-actions released this 13 Jul 16:00
· 1384 commits to main since this release

HydraCache 0.35.0

0.35.0 is a database production-readiness release. It focuses on making the
existing database result-cache layer safer to adopt in real Rust services
through transaction-safe invalidation guidance, key/tag checklists, adapter
parity coverage, database-focused observability, and release-gate clarity.

Highlights

  • Database production-readiness guide for explicit, local-first query-result
    caching.
  • Transaction-safe invalidation examples that invalidate only after successful
    commits.
  • Cache key and tag safety checklist for tenant, authorization, filter,
    pagination, sorting, locale, region, feature flag, and time-window dimensions.
  • Adapter error-context hardening for SQLx, Diesel, SeaORM, and repository
    loaders where it can be done without making adapters own query execution.
  • SQLx reference scenarios for exactly-one, optional, collection, repository,
    transaction-owned, negative-cache, and Postgres smoke-test flows.
  • Diesel and SeaORM parity coverage for common result shapes and failure
    behavior.
  • Database-cache observability guidance that maps core counters to loader
    avoidance, single-flight activity, invalidation, stale fallback, and load
    failures.
  • Sandbox production-readiness demo path for miss, hit, update, rollback,
    invalidation, reload, and diagnostics flows.

Changes

  • Added docs/DB_PRODUCTION_READINESS.md as the central production checklist
    for database result caching.
  • Linked the database readiness guide from the README and policy guide.
  • Tracked the 0.35.0 implementation plan under
    docs/plans/V0_35_DATABASE_PRODUCTION_READINESS_PLAN.md.
  • Added policy-guide coverage for tenant, permission, escaped filter,
    pagination, sorting, collection-tag, and unsafe-key documentation scenarios.
  • Added transaction-safe invalidation tests for failed writes, rollback,
    committed update, committed insert, committed delete, and repeated
    invalidation.
  • Added DbOperationContext, DbAdapterKind, and DbResultShape so
    database-cache errors include adapter, operation, namespace, key, and result
    shape context.
  • Labeled SQLx, Diesel, and SeaORM helper errors with adapter-specific result
    shapes while keeping the database libraries responsible for typed database
    errors.
  • Expanded DbCacheError::MissingKey with adapter, namespace, and result-shape
    fields. This is a pre-1.0 diagnostic API adjustment; callers matching the
    variant should use .. for forward-compatible pattern matches.
  • Strengthened SQLx SQLite reference coverage for transaction commit/rollback
    invalidation timing and SQLx loader-failure retry/context behavior.
  • Added Diesel and SeaORM transaction timing parity tests for rollback,
    commit-then-invalidate, and cached-value reload behavior.
  • Added DB-cache observability contract guidance and database-neutral
    diagnostics tests for hit/miss/load counters, single-flight joins,
    invalidation counts, stale load discard, and stale fallback after loader
    failure.

Verification

This release should pass:

  • cargo fmt --all -- --check
  • cargo check --workspace --all-targets --locked
  • cargo test --workspace --all-targets --locked
  • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
  • cargo test --doc --workspace --locked
  • RUSTDOCFLAGS="-D warnings" cargo doc --workspace --no-deps --locked
  • .\scripts\verify-release-readiness.ps1 -Version 0.35.0 -RunGate
  • cargo test -p hydracache-db --locked
  • cargo test -p hydracache-sqlx --locked
  • cargo test -p hydracache-diesel --locked
  • cargo test -p hydracache-seaorm --locked
  • cargo test --doc -p hydracache-db --locked
  • cargo test --doc -p hydracache-sqlx --locked
  • cargo test --doc -p hydracache-diesel --locked
  • cargo test --doc -p hydracache-seaorm --locked
  • cargo package -p hydracache-db --allow-dirty
  • cargo package -p hydracache-sqlx --allow-dirty
  • cargo package -p hydracache-diesel --allow-dirty
  • cargo package -p hydracache-seaorm --allow-dirty

Optional real Postgres coverage should pass or skip gracefully when Docker is
not available:

  • cargo test -p hydracache-sqlx --test postgres_testcontainers --locked -- --nocapture