is there a create implementing an in-memory cache with limited capacity (in number of items or size, any would work), time expiration, LRU and, most importantly, stampede mitigation?
I am browsing crates.io but there are so many results it's taking a while...
I don't know of a crate that implements your request, but ... You can combine lru or lru-cache with semaphore or sema for stampede/thundering herd protection, and crius for circuit breaking. And then release it as a crate.
You'll probably want a pretty solid test suite for it, though, which is where all of the real work will be.
Thanks for the suggestions. I already knew lru and lru-cache but not the others. I'll take a look.
I was looking for something already done because it's a quite complex tech which will need a lot of testing, as you say, and I don't know if I would have time to develop and maintain it, but I'm not excluding doing it if my employer approves