Skip to content

Cachex.get returning {:ok, nil} for missing values should be changed #425

@a3kov

Description

@a3kov

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions