caches-rs
caches-rs copied to clipboard
This is a Rust implementation for popular caches (support no_std).
Because keys are stored inside a `KeyRef` type, `.get()` can be complicated or inefficient. For instance, if I have a cache which stores the key as a `Vec`, I'd expect...
How do you get the crate to compile in no_std environments? running `cargo check --no-default-features --features hashbrown` give the following error importing `std`: ```bash error[E0433]: failed to resolve: use of...
Is there a strategy for choosing the sample size for the cache ? Based on the example provided its the sum of all windows, but just wanted to check if...
https://github.com/al8n/caches-rs/blob/ab7fd3c1bd8837b8659d16dcee72a831d7ad6244/src/lru/adaptive.rs#L384 Seems to be buggy. ``` running 1 test thread 'limited_cache::test::test_get_or_insert_default_and_edit_evicts_old_items_to_meet_capacity' panicked at C:\Users\steve\scoop\persist\rustup\.cargo\git\checkouts\caches-rs-f5b438d840965066\ff4eb24\src\lru\adaptive.rs:384:66: called `Option::unwrap()` on a `None` value stack backtrace: 0: std::panicking::begin_panic_handler at /rustc/58eefc33adf769a1abe12ad94b3e6811185b4ce5/library\std\src\panicking.rs:617 1: core::panicking::panic_fmt at /rustc/58eefc33adf769a1abe12ad94b3e6811185b4ce5/library\core\src\panicking.rs:67...
If you look through the CI, test cases related to `TinyLFU` are random failures, which may caused by the implementation of `Bloom`.
To improve the quality of this crate, we need all test cases pass `cargo miri test`.