whitfin / cachex

A powerful caching library for Elixir with support for transactions, fallbacks and expirations
https://hexdocs.pm/cachex/
MIT License
1.61k stars 105 forks source link

Replace libring with Discord's hash ring #357

Closed whitfin closed 2 months ago

whitfin commented 2 months ago

This PR replaces the internal libring usage with Discord's hash ring.

The libring library appears to be significantly slower in my (admittedly basic) tests, but having Discord's name behind the library we're switching to is also quite compelling. There are also some compatibility concerns with libring (such as breaking the build with latest OTP) so I went with the 100% Elixir implementation.

Nobody is using the Ring router yet, so this is not a breaking change.