Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Elixir
  3. nebulex

nebulex

MITElixirv3.0.4

An in-memory and distributed caching toolkit for Elixir, providing a unified abstraction layer for various caching backends.

Visit WebsiteGitHubGitHub
1.4k stars80 forks0 contributors

What is nebulex?

Nebulex is a caching toolkit for Elixir that provides a transparent abstraction layer for integrating caching into applications, similar to how Ecto handles databases. It supports multiple backends like Redis, Memcached, and local caches such as Cachex, and offers features like declarative caching decorators and common caching patterns. The toolkit aims to shield developers from the complexities of underlying caching systems while promoting clean, declarative code.

Target Audience

Elixir developers building applications that require in-memory or distributed caching, particularly those seeking a unified, Ecto-like interface to abstract different caching solutions. It is also suitable for teams needing advanced caching patterns like cache-aside, read-through, or write-through out of the box.

Value Proposition

Developers choose Nebulex for its consistent API across various caching backends, reducing vendor lock-in and simplifying code changes. Its declarative decorator-based caching allows minimal code modifications to add caching, and built-in telemetry integration provides monitoring capabilities without extra setup.

Overview

In-memory and distributed caching toolkit for Elixir.

Use Cases

Best For

  • Elixir applications needing a unified caching abstraction to switch between Redis, Memcached, or local caches without code rewrites.
  • Implementing declarative caching with decorator annotations to easily cache function results, such as database queries in Ecto contexts.
  • Building scalable distributed caching topologies for high-availability Elixir systems.
  • Applying common caching patterns like cache-aside, read-through, or write-through with minimal boilerplate.
  • Monitoring cache performance and metrics through built-in telemetry events in Elixir applications.
  • Integrating caching transparently into existing Elixir codebases with an Ecto-like approach for consistency.

Not Ideal For

  • Projects requiring direct, low-level access to caching backend APIs for custom optimizations or specific features not abstracted by Nebulex.
  • Applications with strict dependency minimization that cannot accommodate optional dependencies like :decorator or :telemetry for full functionality.
  • Simple, single-backend caching needs where using a library like Cachex or :ets directly would be lighter without the abstraction overhead.
  • Teams preferring imperative caching code over declarative decorators, as Nebulex's annotation-based approach adds syntactic complexity.

Pros & Cons

Pros

Unified Caching Abstraction

Provides a consistent API for multiple backends like Redis, Memcached, and Cachex, reducing vendor lock-in and simplifying code changes, as shown in the adapter setup examples.

Declarative Caching Support

Enables easy caching with decorator annotations, minimizing code modifications for caching logic, as demonstrated in the quick start example with Ecto queries.

Built-in Caching Patterns

Implements patterns like cache-aside and read-through out of the box, saving development time and promoting best practices, referenced in the cache usage patterns guide.

Telemetry Integration

Offers monitoring capabilities with built-in events for cache performance metrics, requiring only the :telemetry dependency for setup, as noted in the Info API guide.

Cons

Dependency Management Complexity

Requires optional dependencies like :decorator and :telemetry for full features, adding setup steps and potential version conflicts, as highlighted in the README's dependency instructions.

Abstraction Overhead

The abstraction layer may introduce performance penalties compared to direct backend usage, as indicated by benchmarks focusing on the Nil adapter to measure Nebulex's own impact.

Adapter Limitations

Not all caching backends might be supported or fully abstracted, limiting flexibility for niche solutions, and adapter-specific features may require workarounds.

Frequently Asked Questions

Quick Stats

Stars1,403
Forks80
Contributors0
Open Issues2
Last commit9 days ago
CreatedSince 2017

Tags

#declarative#in-memory-cache#elixir#distributed#caching#telemetry#ecto#decorator-pattern#distributed-cache#ecto-integration#cache-abstraction#framework#cache

Built With

E
Elixir
T
Telemetry

Links & Resources

Website

Included in

Elixir13.1k
Auto-fetched 23 hours ago

Related Projects

cachexcachex

A powerful caching library for Elixir with support for transactions, fallbacks and expirations

Stars1,743
Forks123
Last commit7 months ago
con_cachecon_cache

ets based key/value cache with row level isolated writes and ttl support

Stars927
Forks74
Last commit1 year ago
memoizememoize

A method caching macro for elixir using CAS on ETS.

Stars204
Forks14
Last commit6 months ago
stashstash

A small and user-friendly ETS wrapper for caching in Elixir

Stars52
Forks9
Last commit9 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub