Sourced from cached's changelog.
[0.44.0] / [cached_proc_macro[0.17.0]]
Added
- Option to enable redis multiplex-connection manager on
AsyncRedisCache
Changed
Show proc-macro documentation on docs.rs
Document needed feature flags
Hide implementation details in documentation
Relax
Cached
trait'scache_get
,cache_get_mut
andcache_remove
key parameter. AllowK: Borrow<Q>
likestd::collections::HashMap
and friends. Avoids copies particularly onCached<String, _>
where now you can docache.cache_get("key")
and before you had tocache.cache_get("key".to_string())
.Note: This is a minor breaking change for anyone manually implementing the
Cached
trait. The signatures ofcache_get
,cache_get_mut
, andcache_remove
must be updated to include the additional trait bound on thekey
type:fn cache_get<Q>(&mut self, key: &Q) -> Option<&V> where K: std::borrow::Borrow<Q>, Q: std::hash::Hash + Eq + ?Sized, {
Removed
- Dependency to
lazy_static
andasync_once
are removed.