Class: CurrencyExchange::Storage::RailsCache
- Defined in:
- lib/currency_exchange/storage/rails_cache.rb
Constant Summary
Constants inherited from Cache
Instance Method Summary collapse
Methods inherited from Cache
Instance Method Details
#fetch(key) ⇒ Object
11 12 13 |
# File 'lib/currency_exchange/storage/rails_cache.rb', line 11 def fetch(key) Rails.cache.read(key) end |
#store(key, value) ⇒ Object
15 16 17 18 |
# File 'lib/currency_exchange/storage/rails_cache.rb', line 15 def store(key, value) Rails.cache.write(key, value, :expires_in => 86400) value end |