Module: HasCache::Mixin::CachedMethod
- Defined in:
- lib/has_cache/mixin.rb
Overview
Contains the cached method for proxying calls through HasCache::Cache, on both classes and instances.
Instance Method Summary collapse
Instance Method Details
permalink #cached(*args, &block) ⇒ Object
[View source]
22 23 24 |
# File 'lib/has_cache/mixin.rb', line 22 def cached(*args, &block) HasCache::Cache.new(self, *args, &block) end |
permalink #delete_cached(*args, &block) ⇒ Object
[View source]
26 27 28 29 |
# File 'lib/has_cache/mixin.rb', line 26 def delete_cached(*args, &block) args.push(delete: true) HasCache::Cache.new(self, *args, &block) end |