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

Cache behaviour #74

Closed
LostKobrakai opened this issue Aug 5, 2018 · 1 comment
Closed

Cache behaviour #74

LostKobrakai opened this issue Aug 5, 2018 · 1 comment

Comments

@LostKobrakai
Copy link
Contributor

I just had a look at the cache behaviour for ex_money and it seems it's mixing etag caching with rates caching. For the two built in ets/dets caches this makes no difference as they're simply key/value storages. I'm about to implement one based on ecto and store stuff in the database and there it becomes quite obvious, that those two responsibilities are convoluted. Would be nice if get/1 and put/2 could be replaced more meaningful callback functions.

@kipcole9
Copy link
Owner

kipcole9 commented Aug 6, 2018

Fair call, etagcaching should be separated from rates caching. In which case get/1 and put/2 would be removed from the Money.ExchangeRates.Cache behaviour since they are then just implementation details below the public API.

First thought it to simply use another ets table to cache etags. Would that work for you?

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