iggy
iggy copied to clipboard
Refactor caching - implement trait `CachingStrategy`
Besides that, implement previous, unsafe ring-buffer caching style, add it to config.
After some thoughts, we would like to have implemented:
- old style, unsafe caching, with per-partition ringbuffer from
ringbuffer
crate - new style, safe(r) caching, with global atomic counter
- adaptive caching (in future)
Aim of this task is to provide generic Trait so that implementing new cache strategies should be seamless.
Use https://crates.io/crates/stretto or https://crates.io/crates/moka