foyer-rs / foyer

Hybrid in-memory and disk cache in Rust
https://foyer.rs
Apache License 2.0
291 stars 20 forks source link

refactor: refine small engine read/write model #759

Closed MrCroxx closed 2 weeks ago

MrCroxx commented 2 weeks ago

The current implementation uses two wide-ranged asynchronous mutex for the bloom filter and the set to guarantee the bloom filter doesn't return a false-negative result.

However, as a cache, it is okay to return a false-negative result. The mutex can be much looser.