lib/exchange/cache/rails.rb in exchange-0.8.0 vs lib/exchange/cache/rails.rb in exchange-0.9.0
- old
+ new
@@ -32,10 +32,10 @@
# @raise [CachingWithoutBlockError] an Argument Error when no mandatory block has been given
#
def cached api, opts={}, &block
raise CachingWithoutBlockError.new('Caching needs a block') unless block_given?
- result = client.fetch key(api, opts), :expires_in => Exchange.configuration.cache.expire == :daily ? 86400 : 3600, &block
+ result = client.fetch key(api, opts), :expires_in => config.expire == :daily ? 86400 : 3600, &block
client.delete(key(api, opts)) unless result && !result.to_s.empty?
result
end
\ No newline at end of file