Skip to content

Update cached requirement from 0.59 to 1.0 in /rust#15

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/rust/cached-1.0
Closed

Update cached requirement from 0.59 to 1.0 in /rust#15
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/cargo/rust/cached-1.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github May 21, 2026

Copy link
Copy Markdown
Contributor

Updates the requirements on cached to permit the latest version.

Changelog

Sourced from cached's changelog.

[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 instead of panicking constructors.
  • Optimize TtlCache, LruTtlCache, and ExpiringLruCache to perform exactly one lookup (O(1)) on hit paths for cache_get, cache_get_mut, and cache_get_with_expiry_status by inlining expiration status checks.
  • Breaking: LruCache::try_with_size and LruTtlCache::try_with_size_and_ttl now return Result<_, BuildError> directly instead of std::io::Result as a hard breaking change, aligning them with modern Builder pattern construction.
  • TtlSortedCache::set_ttl now returns Option<Duration> (previously Duration) to match CacheTtl::set_ttl and the set_ttl of every other timed store.
  • LruCache, LruTtlCache, and ExpiringLruCache cache_reset implementations now rebuild their backing stores instead of only clearing entries.
  • DiskCache::cache_get now returns deserialization errors for corrupted entries instead of treating them as cache misses.
  • DiskCache::remove_expired_entries now reports storage and deserialization errors encountered while sweeping instead of ignoring them.
  • Fix timed #[once] caches so TTL starts after the function body finishes executing.
  • Improve macro diagnostics for result_fallback without result = true and for with_cached_flag return types whose names merely contain Return.
  • Fix ExpiringLruCache::cache_capacity to report Some(capacity) (was falling through to the Cached default None, so metrics().capacity was inaccurate

... (truncated)

Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Updates the requirements on [cached](https://github.com/jaemk/cached) to permit the latest version.
- [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.0.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file rust Pull requests that update rust code labels May 21, 2026
@dependabot @github

dependabot Bot commented on behalf of github May 26, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #16.

@dependabot dependabot Bot closed this May 26, 2026
@dependabot
dependabot Bot deleted the dependabot/cargo/rust/cached-1.0 branch May 26, 2026 00:31
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