Class: CustomFragmentCache::CacheHelperMethod
- Inherits:
-
Object
- Object
- CustomFragmentCache::CacheHelperMethod
- Defined in:
- lib/custom_fragment_cache/cache_helper_method.rb
Class Method Summary collapse
Class Method Details
.base_custom_cache(context, method_name, resource, name, options = {}, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/custom_fragment_cache/cache_helper_method.rb', line 3 def self.base_custom_cache(context, method_name, resource, name, = {}, &block) if CustomFragmentCache.configuration.enabled fragment_cache_key = ::CustomFragmentCache::Logic.cache_key(name, resource) = { expires_in: CustomFragmentCache.configuration.expiration_time } context.__send__(method_name, fragment_cache_key, .merge(), &block) else block.call end end |