Skip to content

chore(deps): bump cached from 0.56.0 to 1.1.0#793

Open
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/cached-1.1.0
Open

chore(deps): bump cached from 0.56.0 to 1.1.0#793
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/cached-1.1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jun 2, 2026

Copy link
Copy Markdown
Contributor

Bumps cached from 0.56.0 to 1.1.0.

Changelog

Sourced from cached's changelog.

[1.1.0 / cached_proc_macro 1.1.0]

Added

  • Add ExpiringCache (and ExpiringCacheBuilder) as a size-unbounded store where each value implements the Expires trait and determines its own expiration.
  • Add expires = true attribute to the #[cached] procedural macro: automatically selects ExpiringCache (unbounded) or ExpiringLruCache (LRU-bounded when size is also set), so the return type controls its own expiry via Expires. Compatible with result, option, result_fallback, sync_writes, key/convert, and size. Mutually exclusive with ttl, ty, create, with_cached_flag, unsync_reads, refresh, and unbound.
  • Add support for the expires = true attribute in the #[once] procedural macro to allow single-value functions to utilize value-defined expiration (Expires trait).
  • Add comprehensive unit tests in src/stores/expiring_lru.rs covering the Expires trait and ExpiringLruCache's CachedIter::iter expired-filtering, Clone, std::fmt::Debug, cache_remove, and cache_clear.
  • Implement std::fmt::Debug and Clone for TtlSortedCache (and its internal Entry type) and ExpiringCache to ensure full Debug/Clone trait parity across all 7 core in-memory store types.
  • Add robust unit tests across all remaining core cache stores (UnboundCache, LruCache, TtlCache, LruTtlCache, TtlSortedCache) verifying Debug and Clone trait behaviors; UnboundCache and LruCache also verify PartialEq and Eq.
  • Add comprehensive validation unit tests for each store builder's fallible try_build() methods (asserting expected BuildError outcomes for invalid capacities, sizes, or missing required attributes like ttl).
  • Add unit tests validating the std::fmt::Display representation for all BuildError variants in src/stores/mod.rs.
  • Add standardized micro-benchmarks (benches/cache_benches.rs) for cache hits across all 7 core in-memory stores (UnboundCache, LruCache, TtlCache, LruTtlCache, ExpiringLruCache, ExpiringCache, TtlSortedCache), cache misses & inserts, eviction capacity overhead, and RwLock lock-synchronization (with and without CachedRead::cache_get_read unsynchronized reads).
  • Add new bench target to the Makefile to run the benchmark suite.
  • Add standard, runnable example examples/expires_per_key.rs demonstrating how to use the Expires trait with ExpiringLruCache and ExpiringCache for per-value expiration, including keyed caching via #[cached(expires = true)] and single-value caching via #[once(expires = true)].
  • Add detailed library-level documentation and quickstart example for Expires, ExpiringCache, and ExpiringLruCache to src/lib.rs (automatically synced to README.md).

[1.0.0 / cached_proc_macro 1.0.0 / cached_proc_macro_types 1.0.0]

Upgrading from 0.x? See the 1.0 migration guide for a complete walkthrough of every breaking change (and an agent-oriented version for automated tooling).

Added

  • Add comprehensive async integration tests in tests/cached.rs for CachedAsync methods on TtlCache, LruTtlCache, TtlSortedCache, ExpiringLruCache, and UnboundCache to assert correct on_evict invocation on expired lookups.
  • Add make help and make check/help targets for documenting and validating supported Makefile commands.
  • Add fallible try_build methods to TtlCacheBuilder and ExpiringLruCacheBuilder.
  • Re-export TtlSortedCacheError at the crate root (and via cached::stores) so users can name and match on the error returned by TtlSortedCache::cache_try_set.
  • ExpiringLruCache::store() accessor (mirroring LruTtlCache::store()) for advanced introspection of the inner LruCache.
  • Add ConcurrentCached::cache_delete and ConcurrentCachedAsync::cache_delete for deleting entries without decoding or returning the previous value.
  • CachedPeek trait: non-mutating cache lookups that skip recency updates, TTL refresh, and hit/miss metrics
  • CachedRead trait: shared-reference reads for stores with no read-side mutation; used by unsync_reads
  • CacheEvict trait: explicit evict() method to sweep expired entries from all timed/expiring stores
  • unsync_reads = true option for #[cached]: uses a read lock on the cache-hit path instead of a write lock; requires the store to implement CachedRead (supported by UnboundCache, TtlSortedCache, HashMap, and custom stores that implement CachedRead)
  • on_evict(|k, v| { ... }) eviction callbacks on all in-memory stores (LruCache, TtlCache, LruTtlCache, ExpiringLruCache, TtlSortedCache)
  • ::builder() constructor APIs for all in-memory stores
  • cache_evictions() metric on all stores that support eviction
  • ConcurrentCachedAsync is now implemented for DiskCache; #[concurrent_cached(disk = true)] on an async fn runs all sled I/O on tokio's blocking pool via spawn_blocking instead of blocking the async runtime. Adds the DiskCacheError::BackgroundTaskFailed variant returned if that blocking task is cancelled or panics.
  • #[cached], #[once], and #[concurrent_cached] are now re-exported at the crate root (use cached::cached; works), alongside the existing cached::macros::* path.
  • DiskCacheBuildError, DiskCacheBuilder, RedisCacheBuildError, RedisCacheBuilder, and AsyncRedisCacheBuilder are now re-exported at the crate root, matching the in-memory *Builder re-exports — the error type returned by DiskCache/RedisCache build() is now nameable via the same path the cache type came from.

Changed

  • Make LRU-backed try_build paths consistently use fallible allocation helpers

... (truncated)

Commits

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 2, 2026
@dependabot dependabot Bot requested a review from gmpinder as a code owner June 2, 2026 01:28
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels Jun 2, 2026
Bumps [cached](https://github.com/jaemk/cached) from 0.56.0 to 1.1.0.
- [Changelog](https://github.com/jaemk/cached/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jaemk/cached/commits)

---
updated-dependencies:
- dependency-name: cached
  dependency-version: 1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot force-pushed the dependabot/cargo/cached-1.1.0 branch from 38ca058 to 3f64988 Compare June 12, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file rust Pull requests that update rust code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants