Skip to content

Conversation

@whitfin
Copy link
Owner

@whitfin whitfin commented Oct 28, 2025

This will eventually fix #382, but is heavily WIP.

The idea is to simplify the Cachex API to strip out all unnecessary tagging (i.e. {:ok, _}) and align more with Elixir's stdlib conventions with naming. All of the discussion is in the linked thread, but in particular here are some of the changes:

  • Replace invalid cache calls with an ArgumentError
  • Strip out tagging from all infallible calls
  • Drop ! variants of infallible calls
  • Ensure names are generally consistent with Elixir conventions
  • Clean up dialyzer typing where we can

This will be a large amount of changes, but I'll try to break things up so that it's a) easier to track and b) keep it tested throughout. This will be merged into main when ready, but definitely triggers the 5.x timeline and will not be released until 5.x is "done".

There will be many breaking changes in this migration, but I'll try to keep it minimal. Several breaking changes are just "better", though.

@whitfin whitfin added this to the v5.0.0 milestone Oct 28, 2025
@whitfin whitfin self-assigned this Oct 28, 2025
@whitfin
Copy link
Owner Author

whitfin commented Oct 30, 2025

Progress is good, but there are a few concerns that will span into other issues (see #382 (comment) for context).

@whitfin whitfin changed the title Simplify and naturalize API signatures and return types Simplify and naturalize API signatures and return types (i.e. 5.x) Nov 11, 2025
@whitfin whitfin changed the title Simplify and naturalize API signatures and return types (i.e. 5.x) Simplify and naturalize API signatures and return types (5.x) Nov 11, 2025
@whitfin whitfin linked an issue Nov 17, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cachex.get returning {:ok, nil} for missing values should be changed Revisit Cachex API naming and return structures

2 participants