lib/restrict_cache/cacheable.rb in restrict_cache-0.1.0 vs lib/restrict_cache/cacheable.rb in restrict_cache-0.1.1

- old
+ new

@@ -8,13 +8,15 @@ ACTIVERECORD = :active_record_cache CUSTOM = :custom_cache ALL = [ACTIVERECORD, CUSTOM] def self.get(content) - if defined?(ActiveRecord) && content.class < ActiveRecord::Base - return ACTIVERECORD + case + when defined?(ActiveRecord) && content.class < ActiveRecord::Base + ACTIVERECORD + else + CUSTOM end - CUSTOM end end class << self def build_inner_cache(key)