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

Restructure the syntax of providing default fallbacks #84

Closed
whitfin opened this issue Oct 3, 2016 · 0 comments · Fixed by #85
Closed

Restructure the syntax of providing default fallbacks #84

whitfin opened this issue Oct 3, 2016 · 0 comments · Fixed by #85
Assignees
Milestone

Comments

@whitfin
Copy link
Owner

whitfin commented Oct 3, 2016

The current option style is very clumsy:

Cachex.start(:my_cache, [ fallback_args: [ db, conn ], default_fallback: fn(key, db, conn) ->
  do_something(db, key)
end)

It's extremely long-winded and doesn't really jive with other options. In addition, the use of arbitrarily long arguments is slow and far from optimal.

This should be reworked to make more sense, provide a nicer interface, and remove arbitrarily long argument lists to aid performance.

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

Successfully merging a pull request may close this issue.

1 participant