-
Notifications
You must be signed in to change notification settings - Fork 453
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
cache_nils
vs skip_nil
#961
Comments
Since If I'm reading the As the If I'm getting any of this wrong, please let me know. |
I think the client initialization should be kept that way, the only thing that (in my mind) could be updated is the The issue I'm seeing is that if you're using the Rails cache store, you have to do the following: Rails.cache.fetch(key, skip_nil: false, cache_nils: true) { nil } If you do this, it doesn't work with DalliStore. By "doesn't work" I mean the nil won't be cached Rails.cache.fetch(key, skip_nil: false) { nil } |
@andrepcg So this isn't quite right. Looking at
In
So Some things that I think are true:
Based on the above I stand by my original conclusion - this is a |
Rails.cache.fetch
has askip_nil
attribute that can be passed in. DalliStore is a bit special and usescache_nils
.How about adding support for
skip_nil
so it can work nicely withActiveSupport::Cache::Store
?The text was updated successfully, but these errors were encountered: