Sha256: 3e67f4b8d0c683ef383b5c2476bcd2c226e3c49f49e5de5cb2000ac29eda959a
Contents?: true
Size: 449 Bytes
Versions: 9
Compression:
Stored size: 449 Bytes
Contents
# -*- encoding : utf-8 -*- module SecondLevelCache module ActiveRecord module Core extend ActiveSupport::Concern included do class << self alias_method_chain :find, :cache end end module ClassMethods def find_with_cache(*ids) return all.find(ids.first) if ids.size == 1 && ids.first.is_a?(Fixnum) find_without_cache(*ids) end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems