Open Ambyjkl opened 2 months ago
On second thought, time-based eviction is probably not the best idea; we don't lose much by leaving the compiled regex in the cache, since recompiling can be expensive. Also, Instant
is not available on wasm32-unknown-unknown
. Considering this, I think quick_cache
(https://crates.io/crates/quick_cache/0.6.5) is a better fit.
Hello, I want to use adblock-rust in a setup where concurrency would be beneficial. Although disabling
object-pooling
andunsync-regex-caching
is enough to makeEngine
Send + Sync
, there is still work to be done to actually make concurrent usage efficient. Hence, I want to contribute towards this goal, here is what I'm planing to do:request_tokens
vectorlifeguard
dependencydashmap
doesn't count as it doesn't have eviction support) in previous projects, after a bit of research,mini-moka
(https://crates.io/crates/mini-moka) in particular caught my attention, since it has all the features we need while also providing a non-thread-safe implementation for the single-threaded case, so there can be high code reuse, while also being the sibling ofmoka
which is battle-tested in production on crates.io itselfPlease let me know your thoughts