Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors when storing nil values #195

Closed
alexcastano opened this issue Mar 9, 2023 · 1 comment
Closed

Errors when storing nil values #195

alexcastano opened this issue Mar 9, 2023 · 1 comment

Comments

@alexcastano
Copy link

Hi,

Thank you for your incredible work :)

We are experiencing some crashes after storing some nil values using Cache.put_all([{:key, nil}], ttl: ttl). We use version 2.4.2.

The backtrace is:

image

Reading the code, it seems like we should not store nil values; however, I think this behaviour is not documented 😅

https://github.com/cabol/nebulex/blob/v2.4.2/lib/nebulex/adapters/local.ex#L510

Thank you

@cabol
Copy link
Owner

cabol commented Mar 9, 2023

Hey 👋 ! Yeah, you're right, by default in Nebulex v2 nil values are skipped and that is not documented. Thanks for reporting it, we need to add docs here. On the other hand (quick update), for Nebulex v3 which is ongoing, this is not a constraint anymore, any value will be allowed to be cached.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants