Sha256: f0921e62a1797ede6b4cb1ab1d8bb592cb437c302ba3334846232f73a4de63d5
Contents?: true
Size: 533 Bytes
Versions: 4
Compression:
Stored size: 533 Bytes
Contents
module CacheKeeper module Caching extend ActiveSupport::Concern included do def self.caches(*method_names, **options, &block) method_names.each do |method_name| CacheKeeper.manager.handle self, method_name, options, &block # If the method is already defined, we need to hook it method_added method_name end end def self.method_added(method_name) super CacheKeeper.manager.activate_if_handling self, method_name end end end end
Version data entries
4 entries across 4 versions & 1 rubygems