---
title: "cachex 4.0.0 Breaking Changes on Hex | Since.dev"
description: "What each cachex release removed, renamed or changed: 21 breaking changes in 1 version on Hex, each with its source."
canonical_url: https://since.dev/packages/hex/cachex
last_updated: 2026-12-04
---

# cachex breaking changes

cachex 4.0.0 (September 30, 2024) is its newest release with breaking changes, 21 of them. The first: cachex 4.0.0 requires Elixir 1.7 or later. Every breaking API change we have recorded in cachex on Hex: 21 breaking changes in 1 version. Below, its one version with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `4.1.1`, released June 30, 2025. MIT license. [Source repository](https://github.com/whitfin/cachex)

Its 4.0.0 release requires Elixir 1.7 or later. [Elixir end of life dates](https://since.dev/calendar/elixir.md).

## cachex 4.0.0 breaking changes

cachex 4.0.0, released September 30, 2024: 21 breaking changes.

- **Removed**  

Elixir versions below 1.7 are no longer supported; upgrade Elixir before using this release. [github.com](https://github.com/whitfin/cachex/releases/tag/v4.0.0)
- **Removed** `:fallback`  

Pass the fallback function to Cachex.fetch/4 instead of the cache start option. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `:limit`  

Add a Cachex.Limit.Scheduled hook in the hooks option instead of using limit. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `:nodes`  

Configure nodes through a router, such as Cachex.Router.Jump, instead of the nodes option. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `:stats`  

Add Cachex.Stats as a hook in the hooks option instead of using stats. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `Cachex.count.2`  

Use Cachex.size/2 with the expired option instead of Cachex.count/2. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `Cachex.Warmer.interval.0`  

Set the interval field in the warmer record instead of defining interval/0. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `ExecutionError`  

Match on Cachex.Error in place of ExecutionError. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `set_many.3`  

Use Cachex.put_many/3 instead of set_many/3. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Removed** `set.4`  

Use Cachex.put/4 instead of set/4. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Renamed** `:async`  

Use the required field in a warmer record instead of async, which is roughly its inverse. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Renamed** `:batch_size`  

Use the buffer option in place of batch_size for stream and related functions. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Renamed** `:initial`  

Use the default option in place of initial for incr and decr. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Renamed** `:transactional`  

Use the transactions option in place of transactional. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Renamed** `:ttl`  

Use the expire option in place of ttl in put and related functions. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Renamed** `Cachex.dump.2`  

Call Cachex.save/3 in place of Cachex.dump/2. [github.com](https://github.com/whitfin/cachex/releases/tag/v4.0.0)
- **Renamed** `Cachex.load.2`  

Call Cachex.restore/3 in place of Cachex.load/2. [github.com](https://github.com/whitfin/cachex/releases/tag/v4.0.0)
- **Behavior changed**  

Code matching cache record tuples directly must switch to entry(entry, :field) accessors. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Behavior changed** `Cachex.fetch.4`  

A three-element commit tuple from the fallback now returns a two-element tuple. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Behavior changed** `Cachex.restore.3`  

Code expecting true from restore must now handle a count of restored documents. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)
- **Signature changed** `Cachex.fetch.4`  

The function parameter of fetch is now required rather than optional. [github.com](https://github.com/whitfin/cachex/blob/main/docs/migrations/migrating-to-v4.md)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
