whitfin / cachex

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

Replace libring with Discord's hash ring #357

Closed whitfin closed 1 week ago

whitfin commented 2 weeks 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.