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



9
10
11
12
# File 'lib/second_level_cache/active_record/persistence.rb', line 9

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

#touch(*names) ⇒ Object



14
15
16
# File 'lib/second_level_cache/active_record/persistence.rb', line 14

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

#update_columns(attributes) ⇒ Object

update_column will call update_columns



5
6
7
# File 'lib/second_level_cache/active_record/persistence.rb', line 5

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