Sha256: 6d2337aebc180a6996b576324d5c116b272fd00eb06dfee2ab6b0ba1f7a67a15
Contents?: true
Size: 848 Bytes
Versions: 8
Compression:
Stored size: 848 Bytes
Contents
# -*- encoding : utf-8 -*- module SecondLevelCache module ActiveRecord module Persistence extend ActiveSupport::Concern included do class_eval do alias_method_chain :reload, :second_level_cache alias_method_chain :touch, :second_level_cache alias_method_chain :update_column, :second_level_cache end end def update_column_with_second_level_cache(name, value) update_column_without_second_level_cache(name, value).tap{update_second_level_cache} end def reload_with_second_level_cache(options = nil) reload_without_second_level_cache(options).tap{expire_second_level_cache} end def touch_with_second_level_cache(name = nil) touch_without_second_level_cache(name).tap{update_second_level_cache} end end end end
Version data entries
8 entries across 8 versions & 1 rubygems