Caching is one of the mos popular methods to improve performance. There are different cashing options in Elixir available. But most of them are focused on local caching. Most of the cases developers deal with distributed systems, which involves at least two nodes, therefore, sometimes a local cache might be not enough. So, there should be a a tool or library that give the ability to create different caching topologies depending on our needs; it could be a simple local cache, a distributed or partitioned cache, or even a near cache topology. Nebulex can help you with it.
Nebulex is an open source caching library written in Elixir, with Ecto influence. Nebulex features:
- Simple and fluent API inspired by Ecto
- Flexible and pluggable architecture like Ecto – based on adapter pattern
- Built-in cache adapters
- Local generational Cache
- Distributed or Partitioned Cache
- Multi-level Cache
- Support for different cache topologies – Partitioned, Near, etc.
- Time-based expiration
- Pre/post execution hooks
- Transactions (key-locking)
- Key versioning – optimistic offline locks
- Optional statistics gathering
Additionally, Nebulex has good documentation, starting guide, and available examples. Developers ask to create an issue if any bugs appear.