finds.dev← search

// the find

elixir-nebulex/nebulex

★ 1,391 · Elixir · MIT · updated Jun 2026

In-memory and distributed caching toolkit for Elixir.

Nebulex is a caching abstraction layer for Elixir, modeled after Ecto's adapter pattern. You define a cache module backed by a swappable adapter (local ETS, Redis, Memcached, etc.) and get a consistent API plus declarative decorator-based caching across all of them. Aimed at Phoenix/Ecto developers who want Spring Cache-style annotations without vendor lock-in.

The decorator approach (`@decorate cacheable(...)`, `cache_put`, `cache_evict`) is genuinely clean — cache logic stays out of business logic without macros that feel hacky. The adapter abstraction is properly designed: adapters live in separate packages, so the core stays thin. The `references:` option on `cacheable` lets a secondary-key lookup (e.g., by username) point at the primary-key cache entry instead of duplicating the value — a subtle feature most caching libraries miss. Telemetry integration is first-class, not bolted on; `mix test.ci` runs credo, dialyzer, coverage, and tests together which keeps quality high.

The core package only ships a `Nil` adapter — you must pull in `nebulex_local` or a third-party adapter separately, which adds friction for first-time setup and means adapter quality varies across the ecosystem. Distributed cache topologies are documented but the actual distributed adapters (partitioned, replicated) are in separate repos with their own release cycles, so 'distributed caching toolkit' is more aspirational than batteries-included. The generational GC for local cache (creating a new 'generation' every N hours) is an unusual eviction model that surprises people expecting LRU — it effectively doubles memory usage at generation boundaries. The v3.0 migration was a breaking API change significant enough to warrant a full upgrade guide, which signals the API hasn't fully stabilized.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →