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



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

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

#touch(*names, **opts) ⇒ Object



19
20
21
22
# File 'lib/second_level_cache/active_record/persistence.rb', line 19

def touch(*names, **opts)
  # super: touch(*names, time: nil)
  super(*names, **opts).tap { update_second_level_cache }
end

#update_columns(attributes) ⇒ Object



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

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