Ways to cache exchange rates? #3

Closed
mrmanishs opened this Issue Mar 4, 2012 · 6 comments

Comments

Projects
None yet
2 participants

I love this library, it's nice and simple.

The one item that would be nice is if there was a way to cache exchange rates locally (on a user-defined basis, hourly/etc), so that there isn't a call done everytime to exchange-rates.org.

staskie was assigned Mar 4, 2012

Owner

staskie commented Mar 4, 2012

I accept this. There should be some sort of caching. Let me think about it and I will try to come up with something in a week or two.

Thanks Dominik.

Please let me know if you need me to bounce some ideas or help test.

On Mar 4, 2012, at 3:12 PM, Dominik Staskiewicz wrote:

I accept this. There should be some sort of caching. Let me think about it and I will try to come up with something in a week or two.


Reply to this email directly or view it on GitHub:
#3 (comment)

Dominik - I wanted to see if you had an update on this. Thanks.

Owner

staskie commented Jul 2, 2012

Hi mrmanishs,

I did more thinking about this request and I have a feeling that this simple library should not do any caching. Rates changes every couple of minutes, so it's better to provide them as they are.

If you need any sort of a cache, you probably should implement it in your application.

Of course if more people ask about this, I can have a go, however so far you are the only person requesting this.

Kind Regards,
Dominik

staskie closed this Jul 2, 2012

Thanks Dominik.

Is there a way to get the exchange rate from currency-switcher for caching purposes?

On Jul 2, 2012, at 3:38 AM, Dominik Staskiewicz wrote:

Hi mrmanishs,

I did more thinking about this request and I have a feeling that this simple library should not do any caching. Rates changes every couple of minutes, so it's better to provide them as they are.

If you need any sort of a cache, you probably should implement it in your application.

Of course if more people ask about this, I can have a go, however so far you are the only person requesting this.

Kind Regards,
Dominik


Reply to this email directly or view it on GitHub:
#3 (comment)

Owner

staskie commented Jul 2, 2012

Currently you can find out the rate by doing 1.usd_to_eur. That should give you something like 0.79, while the exact exchange rate is 0.79402.

I think it's a good idea to add a method like 'exchange_rate("usd","eur") to simplify it.

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