You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add time_stores feature flag and re-export web_time as cached::time (#259)
- Add a new 'time_stores' feature flag to gate all time-dependent cache
types so the crate can compile for targets without system time
(e.g. wasm32-unknown-unknown without WASI)
- Expose web_time as a public cached::time module re-export in src/lib.rs
so users can access time primitives via cached::time without a direct
web_time dependency
- Keep the old #[doc(hidden)] pub use web_time re-export for backward compat
- Replace all internal web_time:: imports with crate::time:: throughout
- Update doc-comment examples and example files to use cached::time
- Restructure tests/cached.rs with feature-gated modules
- Enable 'time_stores' in the default feature set (no user-visible breakage)
- Bump version: cached 0.59.0, cached_proc_macro 0.27.0
- Regenerate README.md; run cargo fmt
Co-authored-by: James Kominick <james@kominick.com>
let cache_ty = quote!{cached::TimedSizedCache<#cache_key_ty, #cache_value_ty>};
133
-
let cache_create = quote!{cached::TimedSizedCache::with_size_and_lifespan_and_refresh(#size,std::time::Duration::from_secs(#time), #time_refresh)};
133
+
let cache_create = quote!{cached::TimedSizedCache::with_size_and_lifespan_and_refresh(#size,::cached::time::Duration::from_secs(#time), #time_refresh)};
0 commit comments