Module: SecondLevelCache::ActiveRecord::Persistence

Defined in:
lib/second_level_cache/active_record/persistence.rb

Instance Method Summary collapse

Instance Method Details

#reload(options = nil) ⇒ Object



11
12
13
14
# File 'lib/second_level_cache/active_record/persistence.rb', line 11

def reload(options = nil)
  expire_second_level_cache
  super(options)
end

#touch(*names) ⇒ Object



16
17
18
# File 'lib/second_level_cache/active_record/persistence.rb', line 16

def touch(*names)
  super(*names).tap { update_second_level_cache }
end

#update_columns(attributes) ⇒ Object

update_column will call update_columns



7
8
9
# File 'lib/second_level_cache/active_record/persistence.rb', line 7

def update_columns(attributes)
  super(attributes).tap { update_second_level_cache }
end