Module: ActsAsCached::Mixin
- Defined in:
- lib/cache_fu.rb
Instance Method Summary collapse
Instance Method Details
#acts_as_cached(options = {}) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/cache_fu.rb', line 22 def acts_as_cached( = {}) extend ClassMethods include InstanceMethods .symbolize_keys! # convert the find_by shorthand if find_by = .delete(:find_by) [:finder] = "find_by_#{find_by}".to_sym [:cache_id] = find_by end cache_config.replace .reject { |key,| not ActsAsCached.valued_keys.include? key } .replace .reject { |key,| ActsAsCached.valued_keys.include? key } end |