README.rdoc in big_money-1.2.0 vs README.rdoc in big_money-1.2.1
- old
+ new
@@ -50,9 +50,14 @@
=== Exchange
require 'big_money'
require 'big_money/exchange/yahoo' # Use yahoo finance exchange service.
+ # Cache it with memcache.
+ require 'moneta'
+ require 'moneta/memcache'
+ BigMoney::Exchange.cache = Moneta::Memcache.new(server: 'localhost', default_ttl: 3_600)
+
bm = BigMoney.new('3.99', :usd)
bm.amount #=> BigDecimal.new('3.99')
bm.currency #=> BigMoney::Currency::USD
bm2 = bm.exchange(:aud)