Module: SecondLevelCache::ActiveRecord::Persistence

Extended by:
ActiveSupport::Concern
Defined in:
lib/second_level_cache/active_record/persistence.rb

Instance Method Summary collapse

Instance Method Details

#reload_with_second_level_cache(options = nil) ⇒ Object



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

def reload_with_second_level_cache(options = nil)
  expire_second_level_cache
  reload_without_second_level_cache(options)
end

#touch_with_second_level_cache(*names) ⇒ Object



24
25
26
# File 'lib/second_level_cache/active_record/persistence.rb', line 24

def touch_with_second_level_cache(*names)
  touch_without_second_level_cache(*names).tap{update_second_level_cache}
end

#update_column_with_second_level_cache(name, value) ⇒ Object



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

def update_column_with_second_level_cache(name, value)
  update_column_without_second_level_cache(name, value).tap{update_second_level_cache}
end