Sha256: b8605182e17476340c0566f3a0e771be8e518bd89cd791b951e71fd99515ce28
Contents?: true
Size: 571 Bytes
Versions: 1
Compression:
Stored size: 571 Bytes
Contents
# -*- encoding : utf-8 -*- module SecondLevelCache module ActiveRecord module Base extend ActiveSupport::Concern included do after_destroy :expire_second_level_cache after_save :write_second_level_cache class << self alias_method_chain :update_counters, :cache end end module ClassMethods def update_counters_with_cache(id, counters) Array(id).each{|i| expire_second_level_cache(i)} update_counters_without_cache(id, counters) end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
second_level_cache-1.3.2 | lib/second_level_cache/active_record/base.rb |