whitfin / cachex

A powerful caching library for Elixir with support for transactions, fallbacks and expirations
https://hexdocs.pm/cachex/
MIT License
1.6k stars 103 forks source link

Ensure fetch fallback is called once per key per ttl #348

Closed camilleryr closed 4 months ago

camilleryr commented 5 months ago

Resolves #347

This is the same logic as mentioned in the issue, just cleaned up a bit - let me know if you would like to see any changes!

whitfin commented 5 months ago

Hey @camilleryr, I would actually prefer if this was just the change as discussed in the issue - I actually find that cleaner and given it's a lower diff, it's easier to backtrack through later, too. Hope that's not a problem!

camilleryr commented 5 months ago

Hey @camilleryr, I would actually prefer if this was just the change as discussed in the issue - I actually find that cleaner and given it's a lower diff, it's easier to backtrack through later, too. Hope that's not a problem!

That works for me - I have updated the PR