Class: Exchange::Cache::Base
- Inherits:
-
Object
- Object
- Exchange::Cache::Base
- Extended by:
- SingleForwardable
- Includes:
- Singleton
- Defined in:
- lib/exchange/cache/base.rb
Overview
The base Class for all Caching operations. Essentially generates a helper function for all cache classes to generate a key
Instance Method Summary collapse
-
#cached(api, opts = {}) { ... } ⇒ Object
returns The result of the block called This method has to be the same in all the cache classes in order for the configuration binding to work.
Instance Method Details
#cached(api, opts = {}) { ... } ⇒ Object
returns The result of the block called This method has to be the same in all the cache classes in order for the configuration binding to work
50 51 52 53 54 |
# File 'lib/exchange/cache/base.rb', line 50 def cached api, opts={}, &block raise_caching_needs_block! unless block_given? block.call end |