From the docs, currently Cachex returns {:ok, nil} for missing values, which not only breaks the pattern of :ok/:error tuples in Elixir, but makes it impossible to store valid nil values as it would be impossible to distinguish them.
It should be fixed (in the next major version, as it would break existing code). The easiest fix would be to return :not_found or something like that.
From the docs, currently Cachex returns
{:ok, nil}for missing values, which not only breaks the pattern of:ok/:errortuples in Elixir, but makes it impossible to store validnilvalues as it would be impossible to distinguish them.It should be fixed (in the next major version, as it would break existing code). The easiest fix would be to return
:not_foundor something like that.