# whitfin/cachex

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

Repository: https://github.com/whitfin/cachex
Canonical: https://ross.abutalabs.com/products/cachex
Homepage: https://hexdocs.pm/cachex/
Language: Elixir
License: MIT
License Family: permissive
Topics: caching, caching-library, distributed-systems, memory-cache, performance
Last push: 2026-02-10T20:57:03+00:00

## Health v2 (maintenance only)
Score: 65/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 66, release rhythm 44, longevity 100
- inputs: {"age_days": 3852, "days_push": 204, "days_rel": 295, "gap_med": 34.5, "n_releases_24m": 7}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1744, forks 125 (observed 2026-08-28T04:05:30.588181+00:00)

## What it is
Cachex is a fast in-memory key/value caching library for Elixir with optional features like TTL expiration, size limits, transactions, hooks, and node distribution. It integrates into OTP supervision trees and all features are opt-in.

## Use cases
- cache expensive function results in memory
- add TTL-based expiration to cached values
- limit cache memory with max size protection
- share cache state across cluster nodes
- warm caches proactively or reactively
- run transactional cache operations with row locking
- gather statistics on cache hit rates

## When to choose
- you need a battle-tested in-memory cache for an Elixir/Erlang application
- you want optional features like transactions, fallbacks, and expiration in one library
- you need distributed caching across BEAM nodes

## When to avoid
- you need a persistent or disk-backed cache as the primary store
- you need a multi-language distributed cache like Redis
- your project is not on the BEAM platform

## Facets
- artifact type: library
- maturity: stable
- function: caching
- domain: backend, performance, microservices
- platform: elixir, jvm
- tags: in-memory-cache, key-value-store, ttl-expiration, cache-warming, transactions, otp

## Member repositories
- whitfin/cachex (main) score 65

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:05:30.588181+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T03:29:31.598030+00:00, confidence not recorded.
  - readme: https://github.com/whitfin/cachex (fetched 2026-08-28T04:05:30.588181+00:00, sha c64dce9461ba)
  - homepage: https://hexdocs.pm/cachex/ (fetched 2026-08-29T11:07:13.255963+00:00, sha ce6396a6a130)
- Data as of 2026-08-30T08:39:29.467469+00:00.
