Class: MethodCacher::Configuration
- Inherits:
-
Object
- Object
- MethodCacher::Configuration
- Defined in:
- lib/method_cacher/base.rb
Overview
An object that holds configuration vars for MethodCacher
Instance Method Summary collapse
Instance Method Details
#caching_strategy ⇒ Object
12 13 14 15 16 17 18 |
# File 'lib/method_cacher/base.rb', line 12 def caching_strategy if @caching_strategy @caching_strategy elsif defined? Rails Rails.cache # default to the rails caching strategy if it's a Rails app end end |
#caching_strategy=(strategy) ⇒ Object
8 9 10 |
# File 'lib/method_cacher/base.rb', line 8 def caching_strategy= strategy @caching_strategy = strategy end |