Module: SecondLevelCache::ActiveRecord::Persistence
- Defined in:
- lib/second_level_cache/active_record/persistence.rb
Instance Method Summary collapse
- #reload(options = nil) ⇒ Object
- #touch(*names, **opts) ⇒ Object
-
#update_columns(attributes) ⇒ Object
update_column will call update_columns github.com/rails/rails/blob/5-0-stable/activerecord/lib/active_record/persistence.rb#L315.
Instance Method Details
#reload(options = nil) ⇒ Object
13 14 15 16 |
# File 'lib/second_level_cache/active_record/persistence.rb', line 13 def reload( = nil) expire_second_level_cache super() 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
update_column will call update_columns github.com/rails/rails/blob/5-0-stable/activerecord/lib/active_record/persistence.rb#L315
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 |